function status_drop_down($id) { if($id!="") $new_status = fetch_status($id); if(isset($new_status)&&$new_status=='Completed') { $sql="select status_id,status_name from mst_plan_status where (status_del_status='No') and (status_name='Re-open' ||status_name='Completed' )"; } else if(!isset($new_status)) { $sql="select status_id,status_name from mst_plan_status where status_del_status='No' and status_name!='Completed' and status_name!='Re-open'"; } else { $sql="select status_id,status_name from mst_plan_status where status_del_status='No' and status_name!='Re-open'"; } $rs=doquery($sql); return($rs); }
<img src="<?php echo get_template_directory_uri() . "/images/no-image.png"; ?> " width="165" height="180" alt="" /> <?php } ?> </a> </div> <div class="content"> <h3><span class="dealtitle"><?php echo $deals_res->post_title; ?> </span><span class="price"><?php echo STATUS . " : "; fetch_status(get_post_meta($deals_res->ID, 'status', true), get_post_meta($deals_res->ID, 'is_expired', true)); ?> </span></h3> <?php if (get_post_meta($deals_res->ID, 'coupon_end_date_time', true) != '') { echo "<strong>" . DEAL_DURATION . " : </strong> <br /><strong>" . FROM . " </strong>" . date("F d,Y H:i:s", get_post_meta($deals_res->ID, 'coupon_start_date_time', true)) . " | <strong> To</strong> " . date("F d,Y H:i:s", get_post_meta($deals_res->ID, 'coupon_end_date_time', true)); } else { echo DEAL_FROM . date("F d,Y H:i:s", get_post_meta($deals_res->ID, 'coupon_start_date_time', true)); } ?> <br /><br /> <strong><?php echo DEAL_CONTENT_TEXT; ?> : </strong> <br />
<div class="content"> <h3><span class="dealtitle"><a href="#" onclick="viewtransaction(<?php echo $UID; ?> ,<?php echo $total_deals_obj->ID; ?> )"><?php echo $total_deals_obj->post_title; ?> </a></span> <span class="price"><?php echo STATUS; ?> : <?php fetch_status(get_post_meta($total_deals_obj->ID, 'status', true), get_post_meta($total_deals_obj->ID, 'is_expired', true)); ?> </span></h3> <?php if (get_post_meta($total_deals_obj->ID, 'coupon_end_date_time', true) != '') { echo '<strong>' . DEAL_DURATION . " : <br /> From : </strong> " . date("F d,Y H:i:s", get_post_meta($total_deals_obj->ID, 'coupon_start_date_time', true)) . " | <strong> To : </strong> " . date("F d,Y H:i:s", get_post_meta($total_deals_obj->ID, 'coupon_end_date_time', true)); } else { echo "DEAL start from : " . date("F d,Y H:i:s", get_post_meta($total_deals_obj->ID, 'coupon_start_date_time', true)); } ?> <ul class="deal_li"> <li><span class="field"><?php echo DEAL_COUPON_TEXT; ?> </span><span>: <?php
<?php include_once 'include/connection.php'; include_once 'post_status.php'; fetch_status(); function fetch_status() { $db = new Database(); $db->connect(); $user_id = 1; $content = $_GET['content']; $time = date("Y/m/d"); $query = "insert into status(user_id , content , time) values('{$user_id}','{$content}','{$time}')"; $result = $db->run_query($query); post_status(); }
function templatic_manage_seller_columns($column, $post_id) { echo '<link href="' . get_template_directory_uri() . '/monetize/admin.css" rel="stylesheet" type="text/css" />'; global $post; switch ($column) { /* If displaying the 'status' column. */ case 'status': /* Get the post meta. */ $status = fetch_status(get_post_meta($post_id, 'status', true), get_post_meta($post_id, 'is_expired', true)); /* If no status is found, output a default message. */ _e($status, 'templatic'); break; /* If displaying the 'coupon_start_date_time' column. */ /* If displaying the 'coupon_start_date_time' column. */ case 'coupon_start_date_time': /* Get the coupon_start_date_time for the post. */ $coupon_start_date_time = get_post_meta($post_id, 'coupon_start_date_time', true); /* If coupon_start_date_time were found. */ if ($coupon_start_date_time != '') { echo date('Y-m-d H:i:s', $coupon_start_date_time); } else { _e('Unknown'); } break; case 'coupon_end_date_time': /* Get the coupon_end_date_time for the post. */ $coupon_end_date_time = get_post_meta($post_id, 'coupon_end_date_time', true); /* If coupon_end_date_time were found. */ if (!empty($coupon_end_date_time)) { echo date('Y-m-d H:i:s', $coupon_end_date_time); } else { _e('Continue deal'); } break; case 'deal_sold': /* Get the deal_sold for the post. */ $deal_sold = deal_transaction($post_id); /* If deal_sold were found. */ if (!empty($deal_sold)) { echo $deal_sold; } else { _e('0'); } break; case 'post_category': /* Get the post_category for the post. */ if (templ_is_show_post_category()) { $category = get_the_taxonomies($post); $category_display = str_replace(CUSTOM_MENU_CAT_TITLE . ':', '', $category['seller_category']); $category_display = str_replace(' and ', ', ', $category_display); echo $category_display = str_replace(',,', ', ', $category_display); } else { _e('Uncategorized'); } break; case 'post_tags': /* Get the post_tags for the post. */ $tags = get_the_taxonomies($post); $tags_display = str_replace(CUSTOM_MENU_TAG_TITLE . ':', '', $tags['seller_tags']); $tags_display = str_replace(' and ', ', ', $tags_display); echo $tags_display = str_replace(',,', ', ', $tags_display); break; case 'total_item': /* Get the total_item for the post. */ $total_item = get_post_meta($post_id, 'no_of_coupon', true); /* If terms were found. */ if (!empty($total_item)) { echo $total_item; } else { _e('0'); } break; /* Just break out of the switch statement for everything else. */ /* Just break out of the switch statement for everything else. */ default: break; } }
function store_data() { $cookie = fetch_cookie(); # Validated for certain safety measures. $ua_id = get_ua(); $tokens = param_val("tokens", "/^[:_a-zA-Z0-9 ,-]+\$/"); global $dbhandle; $sql = sprintf("REPLACE INTO survey (\n status_a, \n status_aaaa,\n status_ds4,\n status_ds6,\n status_ipv4,\n status_ipv6,\n status_v6ns,\n status_v6mtu,\n status_dsmtu,\n \n time_a,\n time_aaaa,\n time_ds4,\n time_ds6,\n time_ipv4,\n time_ipv6,\n time_v6ns,\n time_v6mtu,\n time_dsmtu,\n \n tokens,\n ua_id,\n \n cookie, ip, ip4, ip6\n \n )\n VALUES ('%s','%s','%s','%s','%s','%s','%s','%s','%s',\n '%s','%s','%s','%s','%s','%s','%s','%s','%s',\n '%s','%s',\n '%s','%s','%s','%s')", mysql_real_escape_string(fetch_status("a"), $dbhandle), mysql_real_escape_string(fetch_status("aaaa"), $dbhandle), mysql_real_escape_string(fetch_status("ds4"), $dbhandle), mysql_real_escape_string(fetch_status("ds6"), $dbhandle), mysql_real_escape_string(fetch_status("ipv4"), $dbhandle), mysql_real_escape_string(fetch_status("ipv6"), $dbhandle), mysql_real_escape_string(fetch_status("v6ns"), $dbhandle), mysql_real_escape_string(fetch_status("v6mtu"), $dbhandle), mysql_real_escape_string(fetch_status("dsmtu"), $dbhandle), mysql_real_escape_string(fetch_time("a"), $dbhandle), mysql_real_escape_string(fetch_time("aaaa"), $dbhandle), mysql_real_escape_string(fetch_time("ds4"), $dbhandle), mysql_real_escape_string(fetch_time("ds6"), $dbhandle), mysql_real_escape_string(fetch_time("ipv4"), $dbhandle), mysql_real_escape_string(fetch_time("ipv6"), $dbhandle), mysql_real_escape_string(fetch_time("v6ns"), $dbhandle), mysql_real_escape_string(fetch_time("v6mtu"), $dbhandle), mysql_real_escape_string(fetch_time("dsmtu"), $dbhandle), mysql_real_escape_string($tokens, $dbhandle), mysql_real_escape_string($ua_id, $dbhandle), mysql_real_escape_string($cookie, $dbhandle), mysql_real_escape_string(remote_addr(), $dbhandle), mysql_real_escape_string(fetch_addr("ip4"), $dbhandle), mysql_real_escape_string(fetch_addr("ip6"), $dbhandle)); # print $sql; $result = mysql_query($sql, $dbhandle); if (!$result) { $message = 'Invalid query: ' . mysql_error() . "\n"; $message .= 'Whole query: ' . $sql; die($message); } # header("HTTP/1.0 204 No Content"); }
function partition_surveys($surveys, $responses, $accessibility, &$current, &$historical) { foreach ($surveys as $sid => $survey) { // if the survey is available if (isset($accessibility[$sid]['available']) && true === (bool) $accessibility[$sid]['available']) { // get a link to the survey, its status, and the last access date $name = sprintf('<a href="%s">%s</a>', survey_fetch_url_by_survey_name($survey['name']), $survey['title']); $status = fetch_status($sid, $responses); $date = fetch_latest_submission_date($sid, $responses); $avail = fetch_availability($survey, $availability); // but, if the survey is not open, get rid of the link if (STATUS_OPEN !== $availability) { $name = $survey['title']; } $current[] = array($name, $status, $date, $avail); // otherwise the survey is historical } else { $name = $survey['title']; $status = fetch_status($sid, $responses); $date = fetch_latest_submission_date($sid, $responses); $avail = _('Closed'); $historical[] = array($name, $status, $date, $avail); } } }
function partition_surveys($surveys, $responses, $availability, &$current, &$historical) { foreach ($surveys as $sid => $survey) { // if the survey is available if (isset($availability[$sid]['available']) && true === (bool) $availability[$sid]['available']) { $name = sprintf('<a href="%s">%s</a>', survey_fetch_url_by_survey_name($survey['name']), $survey['title']); $status = fetch_status($sid, $responses); $date = fetch_latest_submission_date($sid, $responses); $current[] = array($name, $status, $date); // otherwise the survey is historical } else { $name = $survey['title']; $status = fetch_status($sid, $responses); $date = fetch_latest_submission_date($sid, $responses); $historical[] = array($name, $status, $date); } } }