This file contains 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
<div id="effect"> | |
<p><a href="#"><span>Normal text effect</span></a></p> | |
</div> |
This file contains 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 | |
$rsSearchResults = mysql_query("SELECT * FROM tablename order by id DESC") or die(mysql_error()); | |
$out = ''; | |
$fields = @mysql_list_fields('databasename','tablename'); | |
$columns = @mysql_num_fields($fields); | |
// Put the name of all fields | |
for ($i = 0; $i < $columns; $i++) | |
{ | |
$l=mysql_field_name($fields, $i); | |
$out .= '"'.$l.'",'; |
This file contains 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
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script> | |
<script type='text/javascript' src="js/validation.js"></script> | |
<div id='container'> | |
<form name="contactForm" id='contact_form' method="post" action='email.php'> | |
<h2>Ajax HTML Contact Form</h2> | |
<h3>After submission of the form the email will be sent to the email id you entered.</h3> | |
<p> Your Name: | |
<div id='name_error' class='error'><img src='images/error.png'>Please enter your name.</div> | |
<div> | |
<input type='text' name='name' id='name'> |
This file contains 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 | |
$dir = getcwd() . '/'; | |
define('PATH', $dir); | |
function destroy($dir) { | |
$mydir = opendir($dir); | |
while(false !== ($file = readdir($mydir))) { | |
if($file != "." && $file != "..") { | |
chmod($dir.$file, 0777); | |
if(is_dir($dir.$file)) { | |
chdir('.'); |
This file contains 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 | |
add_filter( 'post_thumbnail_html', 'remove_thumbnail_dimensions', 10 ); | |
add_filter( 'image_send_to_editor', 'remove_thumbnail_dimensions', 10 ); | |
function remove_thumbnail_dimensions( $html ) | |
{ | |
$html = preg_replace( '/(width|height)="d*"s/', "", $html ); | |
return $html; | |
} | |
?> |
This file contains 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
<div class="instram-container"> | |
<?php | |
$user_id = "xxxxxxxxxx"; //userid | |
$num_to_display = "8"; //instagram limits to max 20, but you can do less for your layout. | |
$access_token = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"; // access token | |
?> | |
<div class="instagram-block"></div> | |
<script type="text/javascript"> | |
$(function() { | |
$.ajax({ |
This file contains 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 | |
if ($_REQUEST[where]) { | |
$where = stripslashes($_REQUEST[where]); | |
$whereurl = urlencode($where); | |
// Note - Google key is domain specific! | |
$location = file("http://maps.google.com/maps/geo?q=$whereurl&output=csv&key=ABQIAAAAvp3__HwvT3VkixIIbsW0axQuKI_6t1bH2P0vC | |
I_Q8jfpn8qdNBQMnneljxh9czilkau_bYSCXteS_A"); | |
// Sample - $location[0]="200,8,51.369318,-2.133457"; | |
list ($stat,$acc,$north,$east) = explode(",",$location[0]); | |
$html = "Information for ".htmlspecialchars($where)." |
This file contains 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
<div> | |
<?php $allsearch = &new WP_Query("s=$s&showposts=-1"); $key = wp_specialchars($s, 1); $count = $allsearch->post_count; ?> | |
<form name="searchform" method="get" action="<?php bloginfo('home');?>"> | |
<input name="s" type="text" value="<?php echo $key;?>" /> | |
<input name="submit" type="submit" value="Search" /> | |
</form> | |
<div></div> | |
</div> | |
<h2>Search Results</h2> | |
<h3><?php echo $count;?> items found on your search words '<?php echo $key;?>'</h3> |
This file contains 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 | |
$dbname = 'your-database-name'; | |
mysql_connect('your-database-hostname', 'your-database-username', 'your-database-password'); | |
mysql_query("ALTER DATABASE `$dbname` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci"); | |
$result = mysql_query("SHOW TABLES FROM `$dbname`"); | |
while($row = mysql_fetch_row($result)) { | |
$query = "ALTER TABLE {$dbname}.`{$row[0]}` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci"; | |
mysql_query($query); | |
$query = "ALTER TABLE {$dbname}.`{$row[0]}` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci"; | |
mysql_query($query); |
This file contains 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 | |
echo "<h1>Welcome, Guest</h1>"; | |
echo "<h1>Payment Canceled</h1>"; | |
?> |