Advertisement
Ruslan_Rayanov

help_show

Dec 3rd, 2024
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
T-SQL 0.62 KB | None | 0 0
  1. CREATE OR ALTER FUNCTION [dbo].help_show
  2. (
  3.     @code nvarchar(128),
  4.    @s nvarchar(max)
  5. ) RETURNS  nvarchar(max) as
  6. BEGIN  
  7.     DECLARE @res nvarchar(max)=''
  8.     declare @isDemo bit =iif( dbo.as_setting('demo', '0')='1', 1, 0)  
  9.     if(@isDemo=1) begin
  10.         set @res = '
  11.        <div class="as-oneShow as-oneShow-hideOnClick alert alert-info alert-dismissible" data-code="x1'+@code+'">
  12.        <h3><i class="far fa-hand-point-right"></i> Подсказка по демо</h3>
  13.        '+@s+'
  14.         <a href="#" class="close" data-dismiss="alert" ><i class="fa fa-times"></i></a>
  15.         </div>
  16.        '
  17.     end
  18.     return @res
  19. END
  20.  
  21.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement