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 style="float:right"> | |
<?php | |
$i=0; | |
$sqllist="select count(slip) from totalsale"; | |
$n=mysql_query($sqllist) or die("list".mysql_error()); | |
$r=mysql_fetch_array($n); | |
$c=$r['count(slip)']/30; | |
$c=$c+1; | |
for($i=1;$i<=$c;$i++) | |
{ |
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
function digital_clock() | |
{ | |
var date=new Date() | |
var hours=date.getHours() | |
var minutes=date.getMinutes() | |
var seconds=date.getSeconds() | |
/* | |
*Calls the addZero function to add a zero infront of minutes or seconds if they are below 10, i.e. | |
*to make it look like 12:07:09, not 12:7:9 | |
*/ |
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
function file_upload($f, $folder) { | |
extract($f); | |
echo("<pre>"); | |
print_r($f); | |
echo("</pre>"); | |
//echo($f["photo"]["type"]); | |
$name = $f["photo"]["name"]; | |
$tmp_name = $f["photo"]["tmp_name"]; | |
$size = $f["photo"]["size"]; |
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
$site_url = site_url().'/xmltophp/jobsfeed.xml'; | |
//echo $site_url; | |
$xml = simplexml_load_file($site_url); | |
$ar = xml2array($xml); | |
function xml2array($xml) { | |
$arr = array(); | |
foreach ($xml->children() as $r) { | |
if (count($r->children()) == 0) { | |
$arr[$r->getName()] = strval($r); |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
upstream my-node.com { | |
server 127.0.0.1:3000; | |
keepalive 8; | |
} | |
server { | |
listen 80 default_server; | |
listen [::]:80 default_server ipv6only=on; | |
root /var/www/ez-ejs-master; | |
server_name my-node.com; |
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
var WPA = { | |
send_ajax: function (t, n, z) { | |
var cel; | |
if (typeof $ == 'undefined' || $ == "undefined") { | |
var $ = jQuery; | |
} | |
var e = {}, i = "/wp-admin/admin-ajax.php", o = t.find(".spinner").length; | |
var met=(t.attr("method")=="post" || t.attr("method")=="get")?t.attr("method"):"post"; | |
if (typeof z != "undefined") { | |
e = z; |
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
<html> | |
<body> | |
<form method="post"> | |
<label>Username</label> | |
<input name="username" id="username"><br> | |
<label>Address</label> | |
<textarea name="address" id="address"></textarea><br> | |
<input type="hidden" value="0" id="recordnumber"> | |
<input type="button" id="submit" name="submit" onClick="add(this)" data="add" value="add"> | |
</form> |
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
(function ($) { | |
let bump_all_added = false; | |
let first_click = false; | |
$(document.body).on('update_checkout', function () { | |
if (first_click) { | |
return; | |
} | |
$('.wfob_bump_product').eq(0).trigger('click'); | |
first_click = true; |
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
add_action( 'woocommerce_checkout_update_order_meta', function ( $order_id, $data ) { | |
if ( ! isset( $_POST['_wfacp_post_id'] ) ) { | |
return; | |
} | |
$order = wc_get_order( $order_id ); | |
$field = [ |
OlderNewer