| 1 |
<?php |
| 2 |
|
| 3 |
/*############################### LIBRARY CODE ###############################################*/ |
| 4 |
|
| 5 |
class wpdevart_countdown_setting{ |
| 6 |
public static $list_of_animations=array('bounce','flash','pulse','rubberBand','shake','swing','tada','wobble','bounceIn','bounceInDown','bounceInLeft','bounceInRight','bounceInUp','fadeIn','fadeInDown','fadeInDownBig','fadeInLeft','fadeInLeftBig','fadeInRight','fadeInRightBig','fadeInUp','fadeInUpBig','flip','flipInX','flipInY','lightSpeedIn','rotateIn','rotateInDownLeft','rotateInDownRight','rotateInUpLeft','rotateInUpRight','rollIn','zoomIn','zoomInDown','zoomInLeft','zoomInRight','zoomInUp'); |
| 7 |
public static function get_animations_type_array($animation=''){ |
| 8 |
if($animation=='' || $animation=='none') |
| 9 |
return ''; |
| 10 |
if($animation=='random'){ |
| 11 |
|
| 12 |
return self::$list_of_animations[array_rand(self::$list_of_animations,1)]; |
| 13 |
} |
| 14 |
return $animation; |
| 15 |
} |
| 16 |
|
| 17 |
/*############################### ANIMATION FUNCTIONS #######################################*/ |
| 18 |
|
| 19 |
public static function generete_animation_select($select_id='',$curent_effect='none'){ |
| 20 |
?> |
| 21 |
<select onClick="alert(countdown_pro_text)" id="<?php echo $select_id; ?>" name="<?php echo $select_id; ?>"> |
| 22 |
<option <?php selected('none',$curent_effect); ?> value="none">none</option> |
| 23 |
<option <?php selected('random',$curent_effect); ?> value="random">random</option> |
| 24 |
<optgroup label="Attention Seekers"> |
| 25 |
<option <?php selected('bounce',$curent_effect); ?> value="bounce">bounce</option> |
| 26 |
<option <?php selected('flash',$curent_effect); ?> value="flash">flash</option> |
| 27 |
<option <?php selected('pulse',$curent_effect); ?> value="pulse">pulse</option> |
| 28 |
<option <?php selected('rubberBand',$curent_effect); ?> value="rubberBand">rubberBand</option> |
| 29 |
<option <?php selected('shake',$curent_effect); ?> value="shake">shake</option> |
| 30 |
<option <?php selected('swing',$curent_effect); ?> value="swing">swing</option> |
| 31 |
<option <?php selected('tada',$curent_effect); ?> value="tada">tada</option> |
| 32 |
<option <?php selected('wobble',$curent_effect); ?> value="wobble">wobble</option> |
| 33 |
</optgroup> |
| 34 |
|
| 35 |
<optgroup label="Bouncing Entrances"> |
| 36 |
<option <?php selected('bounceIn',$curent_effect); ?> value="bounceIn">bounceIn</option> |
| 37 |
<option <?php selected('bounceInDown',$curent_effect); ?> value="bounceInDown">bounceInDown</option> |
| 38 |
<option <?php selected('bounceInLeft',$curent_effect); ?> value="bounceInLeft">bounceInLeft</option> |
| 39 |
<option <?php selected('bounceInRight',$curent_effect); ?> value="bounceInRight">bounceInRight</option> |
| 40 |
<option <?php selected('bounceInUp',$curent_effect); ?> value="bounceInUp">bounceInUp</option> |
| 41 |
</optgroup> |
| 42 |
|
| 43 |
<optgroup label="Fading Entrances"> |
| 44 |
<option <?php selected('fadeIn',$curent_effect); ?> value="fadeIn">fadeIn</option> |
| 45 |
<option <?php selected('fadeInDown',$curent_effect); ?> value="fadeInDown">fadeInDown</option> |
| 46 |
<option <?php selected('fadeInDownBig',$curent_effect); ?> value="fadeInDownBig">fadeInDownBig</option> |
| 47 |
<option <?php selected('fadeInLeft',$curent_effect); ?> value="fadeInLeft">fadeInLeft</option> |
| 48 |
<option <?php selected('fadeInLeftBig',$curent_effect); ?> value="fadeInLeftBig">fadeInLeftBig</option> |
| 49 |
<option <?php selected('fadeInRight',$curent_effect); ?> value="fadeInRight">fadeInRight</option> |
| 50 |
<option <?php selected('fadeInRightBig',$curent_effect); ?> value="fadeInRightBig">fadeInRightBig</option> |
| 51 |
<option <?php selected('fadeInUp',$curent_effect); ?> value="fadeInUp">fadeInUp</option> |
| 52 |
<option <?php selected('fadeInUpBig',$curent_effect); ?> value="fadeInUpBig">fadeInUpBig</option> |
| 53 |
</optgroup> |
| 54 |
|
| 55 |
<optgroup label="Flippers"> |
| 56 |
<option <?php selected('flip',$curent_effect); ?> value="flip">flip</option> |
| 57 |
<option <?php selected('flipInX',$curent_effect); ?> value="flipInX">flipInX</option> |
| 58 |
<option <?php selected('flipInY',$curent_effect); ?> value="flipInY">flipInY</option> |
| 59 |
</optgroup> |
| 60 |
|
| 61 |
<optgroup label="Lightspeed"> |
| 62 |
<option <?php selected('lightSpeedIn',$curent_effect); ?> value="lightSpeedIn">lightSpeedIn</option> |
| 63 |
</optgroup> |
| 64 |
|
| 65 |
<optgroup label="Rotating Entrances"> |
| 66 |
<option <?php selected('rotateIn',$curent_effect); ?> value="rotateIn">rotateIn</option> |
| 67 |
<option <?php selected('rotateInDownLeft',$curent_effect); ?> value="rotateInDownLeft">rotateInDownLeft</option> |
| 68 |
<option <?php selected('rotateInDownRight',$curent_effect); ?> value="rotateInDownRight">rotateInDownRight</option> |
| 69 |
<option <?php selected('rotateInUpLeft',$curent_effect); ?> value="rotateInUpLeft">rotateInUpLeft</option> |
| 70 |
<option <?php selected('rotateInUpRight',$curent_effect); ?> value="rotateInUpRight">rotateInUpRight</option> |
| 71 |
</optgroup> |
| 72 |
|
| 73 |
<optgroup label="Specials"> |
| 74 |
|
| 75 |
<option <?php selected('rollIn',$curent_effect); ?> value="rollIn">rollIn</option> |
| 76 |
</optgroup> |
| 77 |
|
| 78 |
<optgroup label="Zoom Entrances"> |
| 79 |
<option <?php selected('zoomIn',$curent_effect); ?> value="zoomIn">zoomIn</option> |
| 80 |
<option <?php selected('zoomInDown',$curent_effect); ?> value="zoomInDown">zoomInDown</option> |
| 81 |
<option <?php selected('zoomInLeft',$curent_effect); ?> value="zoomInLeft">zoomInLeft</option> |
| 82 |
<option <?php selected('zoomInRight',$curent_effect); ?> value="zoomInRight">zoomInRight</option> |
| 83 |
<option <?php selected('zoomInUp',$curent_effect); ?> value="zoomInUp">zoomInUp</option> |
| 84 |
</optgroup> |
| 85 |
</select> |
| 86 |
<?php |
| 87 |
} |
| 88 |
|
| 89 |
/*###################### Function for generating fonts ##################*/ |
| 90 |
|
| 91 |
public static function generete_fonts($select_id='',$curent_font='none'){ |
| 92 |
?> |
| 93 |
<select onClick="alert(countdown_pro_text)" id="<?php echo $select_id; ?>" name="<?php echo $select_id; ?>"> |
| 94 |
|
| 95 |
<option <?php selected('Arial,Helvetica Neue,Helvetica,sans-serif',$curent_font); ?> value="Arial,Helvetica Neue,Helvetica,sans-serif">Arial *</option> |
| 96 |
<option <?php selected('Arial Black,Arial Bold,Arial,sans-serif',$curent_font); ?> value="Arial Black,Arial Bold,Arial,sans-serif">Arial Black *</option> |
| 97 |
<option <?php selected('Arial Narrow,Arial,Helvetica Neue,Helvetica,sans-serif',$curent_font); ?> value="Arial Narrow,Arial,Helvetica Neue,Helvetica,sans-serif">Arial Narrow *</option> |
| 98 |
<option <?php selected('Courier,Verdana,sans-serif',$curent_font); ?> value="Courier,Verdana,sans-serif">Courier *</option> |
| 99 |
<option <?php selected('Georgia,Times New Roman,Times,serif',$curent_font); ?> value="Georgia,Times New Roman,Times,serif">Georgia *</option> |
| 100 |
<option <?php selected('Times New Roman,Times,Georgia,serif',$curent_font); ?> value="Times New Roman,Times,Georgia,serif">Times New Roman *</option> |
| 101 |
<option <?php selected('Trebuchet MS,Lucida Grande,Lucida Sans Unicode,Lucida Sans,Arial,sans-serif',$curent_font); ?> value="Trebuchet MS,Lucida Grande,Lucida Sans Unicode,Lucida Sans,Arial,sans-serif">Trebuchet MS *</option> |
| 102 |
<option <?php selected('Verdana,sans-serif',$curent_font); ?> value="Verdana,sans-serif">Verdana *</option> |
| 103 |
<option <?php selected('American Typewriter,Georgia,serif',$curent_font); ?> value="American Typewriter,Georgia,serif">American Typewriter</option> |
| 104 |
<option <?php selected('Andale Mono,Consolas,Monaco,Courier,Courier New,Verdana,sans-serif',$curent_font); ?> value="Andale Mono,Consolas,Monaco,Courier,Courier New,Verdana,sans-serif">Andale Mono</option> |
| 105 |
<option <?php selected('Baskerville,Times New Roman,Times,serif',$curent_font); ?> value="Baskerville,Times New Roman,Times,serif">Baskerville</option> |
| 106 |
<option <?php selected('Bookman Old Style,Georgia,Times New Roman,Times,serif',$curent_font); ?> value="Bookman Old Style,Georgia,Times New Roman,Times,serif">Bookman Old Style</option> |
| 107 |
<option <?php selected('Calibri,Helvetica Neue,Helvetica,Arial,Verdana,sans-serif',$curent_font); ?> value="Calibri,Helvetica Neue,Helvetica,Arial,Verdana,sans-serif">Calibri</option> |
| 108 |
<option <?php selected('Cambria,Georgia,Times New Roman,Times,serif',$curent_font); ?> value="Cambria,Georgia,Times New Roman,Times,serif">Cambria</option> |
| 109 |
<option <?php selected('Candara,Verdana,sans-serif',$curent_font); ?> value="Candara,Verdana,sans-serif">Candara</option> |
| 110 |
<option <?php selected('Century Gothic,Apple Gothic,Verdana,sans-serif',$curent_font); ?> value="Century Gothic,Apple Gothic,Verdana,sans-serif">Century Gothic</option> |
| 111 |
<option <?php selected('Century Schoolbook,Georgia,Times New Roman,Times,serif',$curent_font); ?> value="Century Schoolbook,Georgia,Times New Roman,Times,serif">Century Schoolbook</option> |
| 112 |
<option <?php selected('Consolas,Andale Mono,Monaco,Courier,Courier New,Verdana,sans-serif',$curent_font); ?> value="Consolas,Andale Mono,Monaco,Courier,Courier New,Verdana,sans-serif">Consolas</option> |
| 113 |
<option <?php selected('Constantia,Georgia,Times New Roman,Times,serif',$curent_font); ?> value="Constantia,Georgia,Times New Roman,Times,serif">Constantia</option> |
| 114 |
<option <?php selected('Corbel,Lucida Grande,Lucida Sans Unicode,Arial,sans-serif',$curent_font); ?> value="Corbel,Lucida Grande,Lucida Sans Unicode,Arial,sans-serif">Corbel</option> |
| 115 |
<option <?php selected('Franklin Gothic Medium,Arial,sans-serif',$curent_font); ?> value="Franklin Gothic Medium,Arial,sans-serif">Franklin Gothic Medium</option> |
| 116 |
<option <?php selected('Garamond,Hoefler Text,Times New Roman,Times,serif',$curent_font); ?> value="Garamond,Hoefler Text,Times New Roman,Times,serif">Garamond</option> |
| 117 |
<option <?php selected('Gill Sans MT,Gill Sans,Calibri,Trebuchet MS,sans-serif',$curent_font); ?> value="Gill Sans MT,Gill Sans,Calibri,Trebuchet MS,sans-serif">Gill Sans MT</option> |
| 118 |
<option <?php selected('Helvetica Neue,Helvetica,Arial,sans-serif',$curent_font); ?> value="Helvetica Neue,Helvetica,Arial,sans-serif">Helvetica Neue</option> |
| 119 |
<option <?php selected('Hoefler Text,Garamond,Times New Roman,Times,sans-serif',$curent_font); ?> value="Hoefler Text,Garamond,Times New Roman,Times,sans-serif">Hoefler Text</option> |
| 120 |
<option <?php selected('Lucida Bright,Cambria,Georgia,Times New Roman,Times,serif',$curent_font); ?> value="Lucida Bright,Cambria,Georgia,Times New Roman,Times,serif">Lucida Bright</option> |
| 121 |
<option <?php selected('Lucida Grande,Lucida Sans,Lucida Sans Unicode,sans-serif',$curent_font); ?> value="Lucida Grande,Lucida Sans,Lucida Sans Unicode,sans-serif">Lucida Grande</option> |
| 122 |
<option <?php selected('monospace',$curent_font); ?> value="monospace">monospace</option> |
| 123 |
<option <?php selected('Palatino Linotype,Palatino,Georgia,Times New Roman,Times,serif',$curent_font); ?> value="Palatino Linotype,Palatino,Georgia,Times New Roman,Times,serif">Palatino Linotype</option> |
| 124 |
<option <?php selected('Tahoma,Geneva,Verdana,sans-serif',$curent_font); ?> value="Tahoma,Geneva,Verdana,sans-serif">Tahoma</option> |
| 125 |
<option <?php selected('Rockwell, Arial Black, Arial Bold, Arial, sans-serif',$curent_font); ?> value="Rockwell, Arial Black, Arial Bold, Arial, sans-serif">Rockwell</option> |
| 126 |
</select> |
| 127 |
<?php |
| 128 |
|
| 129 |
} |
| 130 |
|
| 131 |
/*############################### COUNTDOWN THEMES FUNCTION #######################################*/ |
| 132 |
|
| 133 |
public static function darkest_brigths($color,$pracent){ |
| 134 |
$new_color=$color; |
| 135 |
if(!(strlen($new_color==6) || strlen($new_color)==7)) |
| 136 |
{ |
| 137 |
return $color; |
| 138 |
} |
| 139 |
$color_vandakanishov=strpos($new_color,'#'); |
| 140 |
if($color_vandakanishov == false) { |
| 141 |
$new_color= str_replace('#','',$new_color); |
| 142 |
} |
| 143 |
$color_part_1=substr($new_color, 0, 2); |
| 144 |
$color_part_2=substr($new_color, 2, 2); |
| 145 |
$color_part_3=substr($new_color, 4, 2); |
| 146 |
$color_part_1=dechex( (int) (hexdec( $color_part_1 ) - (hexdec( $color_part_1 )* $pracent / 100 ))); |
| 147 |
$color_part_2=dechex( (int) (hexdec( $color_part_2) - (( ( hexdec( $color_part_2 ) ) ) * $pracent / 100 ))); |
| 148 |
$color_part_3=dechex( (int) (hexdec( $color_part_3 ) - (( ( hexdec( $color_part_3 ) ) ) * $pracent / 100 ))); |
| 149 |
if(strlen($color_part_1)<2) $color_part_1="0".$color_part_1; |
| 150 |
if(strlen($color_part_2)<2) $color_part_2="0".$color_part_2; |
| 151 |
if(strlen($color_part_3)<2) $color_part_3="0".$color_part_3; |
| 152 |
|
| 153 |
$new_color=$color_part_1.$color_part_2.$color_part_3; |
| 154 |
if($color_vandakanishov == false){ |
| 155 |
return $new_color; |
| 156 |
} |
| 157 |
else{ |
| 158 |
return '#'.$new_color; |
| 159 |
} |
| 160 |
} |
| 161 |
|
| 162 |
} |
| 163 |
|
| 164 |
|
| 165 |
?> |