This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function jszz(s){ | |
| s=s*1000; | |
| var a=true; | |
| var n=new Date(); | |
| var w; | |
| var sMS=n.getTime(); | |
| while(a){ | |
| w=new Date(); | |
| wMS=w.getTime(); | |
| if(wMS-sMS>s) a=false; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function smartShorten($charset='utf-8', $str, $maxlength = 140, $max_cut_len = 10) { | |
| $len = iconv_strlen($str, $charset); | |
| if ($len > $maxlength) { | |
| $str = iconv_substr($str, 0, $maxlength, $charset); | |
| $prev_space_pos = iconv_strrpos($str, ' ', $charset); | |
| if ( ($maxlength-$prev_space_pos) < $max_cut_len) { | |
| $str = iconv_substr($str, 0, $prev_space_pos, $charset); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| global $wpdb; | |
| // @ prefix used to suppress errors, but you should do your own | |
| // error checking by checking return values from each mysql_query() | |
| // Start Transaction | |
| @mysql_query("BEGIN", $wpdb->dbh); | |
| // Do some expensive/related queries here |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| function check_Str_len($string) { | |
| echo stripslashes($string).'<br />'; | |
| echo strlen( stripslashes($string) ).'<br />'; | |
| } | |
| check_Str_len('843175010'); | |
| ?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| function query( $query ) { | |
| if ( ! $this->ready ) | |
| return false; | |
| if ( strpos($query, "CALL") === false ) | |
| { | |
| $this->dbh = mysql_connect( $this->dbhost, $this->dbuser, $this->dbpassword, true ); | |
| $this->set_charset( $this->dbh ); | |
| $this->ready = true; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| if(!function_exists('_log')){ | |
| function _log( $message ) { | |
| if( WP_DEBUG === true ){ | |
| if( is_array( $message ) || is_object( $message ) ){ | |
| error_log( print_r( $message, true ) ); | |
| } else { | |
| error_log( $message ); | |
| } | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /*--------------------------------------------------*/ | |
| /* SMS CLICKATELL | |
| * | |
| * Http API | |
| * | |
| * @param string user | |
| * @param string password | |
| * @param int api_id | |
| * @param int/"array" to (cellphone number) / "","","" | |
| * @param string text (sms message) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <rewrite> | |
| <rules> | |
| <rule name="Redirect domain.com to www" patternSyntax="Wildcard" stopProcessing="true"> | |
| <match url="*" /> | |
| <conditions> | |
| <add input="{HTTP_HOST}" pattern="domain.com" /> | |
| </conditions> | |
| <action type="Redirect" url="http://www.domain.com/{R:0}" /> | |
| </rule> | |
| </rules> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <system.webServer> | |
| <httpCompression directory="%SystemDrive%\inetpub\temp\IIS Temporary Compressed Files"> | |
| <scheme name="gzip" dll="%Windir%\system32\inetsrv\gzip.dll"/> | |
| <dynamicTypes> | |
| <add mimeType="text/*" enabled="true"/> | |
| <add mimeType="message/*" enabled="true"/> | |
| <add mimeType="application/javascript" enabled="true"/> | |
| <add mimeType="*/*" enabled="false"/> | |
| </dynamicTypes> | |
| <staticTypes> |
OlderNewer