Strtotimedela
Fix incorrect script in attachment. Calculation in this script always results in 31 days, because in the script with strtotime +1 month always 31 days are added. We need the exact number of days between selected day today and day in 1 month minus 1. This leads to wrong time periods. Example: selected is 20/02/2023, we need to add 27 days, not 31. Calculation to correct number of days is ((20/02/2023 + 1 month) minus 20/02/2023 - 1 day) +20/02/2023
...$city_state = $customer_detail['city']; } elseif($customer_detail['area'] != '') { $city_state = $customer_detail['city']; } $task_detail = $this->mdl_common->get_record('fp_task', array('task_id' => $inserted_task_id, 'finance_id' => $finance_id, 'account_id' => $this->session->userdata("account_id"), 'task_type' => '-1', 'is_del' => 0))->row_array(); $date = date('d/m', strtotime($task_detail['creation_datetime'])); $ticket_id1 = $task_detail['ticket_id']; $results = Array(); foreach ($sale_itme as $val) { $product_name = $val['item_name']...
...if(count($output_array_dates1)>1) { $checkdateis = $output_array_dates1['day']."-".$output_array_dates1['month']."-".$output_array_dates1['year']; } if(validateDate($checkdateis)){ $checkdateis = $checkdateis; } if(!empty($checkdateis)){ echo json_encode(array("valid "=>true,"string_date"=>date("m/d/Y",strtotime($checkdateis)),"string_date_time"=>date("Y-m-d H:i:s",strtotime($checkdateis)))) ; }else{ preg_match( '/([0-9]?[0-9])[.-/ ]+([0-1]?[0-9])[.-/ ]+([0-9]{2,2})/', $postdate, $matches ); if(validateDate($matches[0],"d-m-y") &&am...
Hi Sergey G., I need this PHP code fixed. strftime("%A, %d %B %G", strtotime($funeraille_jour[$i])) The date keeps showing up as Mercredi, 01 juin 2022 and I need it to show like this: Mercredi, 1 juin 2022 No matter what I've done, it stays as 01.
...el contenido E o W si se cumple la condicion 1 o 2) ---------------------------------------------------------------------------------------------------------------------- if (strcmp($data['facility'],"1")==1) $facility='E'; else $facility='W'; function patient_info_before_insert(&$data, $memberInfo, &$args) { $data['ID_double'] = substr($data['member_name'], 0, 1) . date('mdY', strtotime($data['dob'])) .$facility; return TRUE; } ----------------------------------------------------------------------------------------------------------------------------------------- Y AQUI, $data['total'] NO DEBERIA REDEONDEAR EL RESULTADO, ES DECIR MOSTRAR EL RESULTADOS CON DOS DECIM...
...Filter RSS Feeds, like */ function add_events_to_rss_feed( $args ) { if ( isset( $args['feed'] ) && !isset( $args['post_type'] ) ) { $args['post_type'] = array( 'post' => 'tribe_events', 'meta_query' => array( array( 'key' => '_EventStartDate', 'value' => date('Y-m-d H:i:s', strtotime('+1 week')), 'compare' => 'date' ) ) );//array( 'post', 'tribe_events','order'=>'DESC','posts_per_page' => 5 ); //$dummy_query = new WP_Query($args); // the query isn't run if we don't pass any query vars ...
...Sunday on Region de Valparaíso" add_filter( 'woocommerce_add_to_cart_validation', 'date_validation', 20, 3 ); function date_validation( $passed, $product_id, $quantity ) { if($_REQUEST['booking_calender']!='' && $_REQUEST['wapf']['field_604567fc83dc1']=='bii5x'){ $var = $_REQUEST['booking_calender']; $date = DateTime::createFromFormat('d/m/y', $var); if(date('D', strtotime($date->format('Y-m-d'))) == 'Sun'){ wc_add_notice( __( 'En region de Valparaíso operamos solo de lunes a sabado. Favor selecciona otra fecha.', 'woocommerce' ), 'error' ); $...
... $headers = $msg->getPayload()->getHeaders(); $snippet = $msg->getSnippet(); foreach($headers as $single) { if ($single->getName() == 'Subject') { $message_subject = $single->getValue(); } elseif ($single->getName() == 'Date') { $message_date = $single->getValue(); $message_date = date('M jS Y h:i A', strtotime($message_date)); } elseif ($single->getName() == 'From') { $message_sender = $single->getValue(); $message_sender = str_replace('"', NULL, $message_sender); $message_sender = str_replace("'", NULL, $message_sender); ...
...echo $docDescription; if ($row['docDescription'] == "") { echo "None Description."; } ?></sub><sub><?php echo date( 'd-m-Y g:i A', strtotime($row['uploadDate']) ); ?></sub></figcaption> </figure> </div> <p class="page-header"> ...
...echo $docDescription; if ($row['docDescription'] == "") { echo "None Description."; } ?></sub><sub><?php echo date( 'd-m-Y g:i A', strtotime($row['uploadDate']) ); ?></sub></figcaption> </figure> </div> <p class="page-header"> ...
...($orders as $order => $value) { $order_id = $value->ID; $order = wc_get_order($order_id); $order_data = $order->get_data(); $completed_date = $order->get_date_completed(); $today = strtotime( date('Y-m-d') ); $yesterday = strtotime(date("Y-m-d"),time())-3600*24; if (strtotime($completed_date) > $today ) { if ( $order_data['billing']['postcode'] === '洛陽' ) $total_ca += $order->get_total(); if ( $order_data['billing']['postcode'] === '星馳' ) $total_az += $order->get_total(); } if (strtotime($completed_date) > $yesterday && strtotime($completed_date) < $today ) { ...
We have a Highchart deployed for monitoring total successful requests inside our application. It runs every 10... }, threshold: null } }, series: [{ name: 'Page1', color: '#00ff00', data: [ <?for($x=1; $day = $getstats1->fetch_assoc(); $x++){ if(!is_null($day['date'])){?> [(<?=date("Y",strtotime($day['date'])).', '.date("m",strtotime($day['date'])).'-1, '.date("d",strtotime($day['date'])).', '.date("H",strtotime($day['date'])).', '.date("i",strtotime($day['date'])...
I need for the Laravel web app to get the user's current time correctly. Its off by 1 hour and I cannot figure out why. An experieneced Laravel/PHP/Javascript developer is needed to solve a simple issue. The code below gives a time off by 1 hour even though the API delivered GMT time. $etime = CarbonCarbon::createFromTimestampUTC(strtotime($channel->live_event_date . " GMT")); $etime->timezone(config('')); $evtime = $etime->format('l dS F Y at h:i a'); Need this done ASAP as in the next 2 hours.
...must be created by you, it has 2 col. username varchar255 and time which is a timestamp <ul class="list-group list-group-flush tx-13" > <?php $table = 'table'; $query = sql_query($db, "SELECT * FROM `$table` WHERE `username` = 'test' ORDER BY `time` DESC"); while ($row = mysqli_fetch_assoc($query)) { $formatted_datetime = date("m/d/y, g:ia", strtotime($row['time'])); echo ' <li class="list-group-item d-flex pd-sm-x-20"> <div class="avatar d-none d-sm-block"><span class="avatar-initial rounded-circle"><i class="icon ion-md-checkmark"></i></span></...
I need to update a "TimeStamp" value in MySQL when a condition happens. Something like that: if(strtotime(date("Y-m-d H:i:s")) >= $this->tiempoLimite($row['timestamp'], 'minutosParaDecidir')){ //Venció el tiempo por lo que cambiamos al usuario a estatus 8 if(!$this->cambiaEstatus($row['id'], 8)){ $resultado['plantilla'] = '500'; } else { $resultado['plantilla'] = 3; $resultado['arreglo'] = array( 'textoEstatus' => $this->reemplazaTexto('textoEstatus8', $row['code']), ); $this->email($row['code'], 1);
this is not working $wpdb->query(' INSERT INTO wp_nsolutions_sent (submit_time, email, expires, contents, date, days, discount) VALUES ( "'.$submit_time.'.3232", "'.$to.'", "'.strtotime('+'.$data['expires'].'days').'", "'.mysql_real_escape_string($content).'", "'.time().'", "'.$days.'", "'.$data['discount'].'") ');
Hello, I need the filter below to work only for the contributor role. The filter is inside the wordpress Thanks /** * */ add_filter('wppizza_filter_orders_query', 'myprefix_admin_orderhistory_query_filter'); function myprefix_admin_orderhistory_query_filter($query){ $today = date('Y-m-d',current_time('timestamp')); $yesterday_start = date('Y-m-d',strtotime("-0 days")); $today_end = $today.' 23:59:59'; /* edit/alter the query where clause */ $query = str_ireplace('WHERE', 'WHERE order_date>="'.$yesterday_start.'" AND order_date<="'.$today_end.'" AND ', $query); return $query; }
...fetchAll( $sql, array( $productId ) ); if (!empty($data) && !empty($data[0])) { $specialQty = (int)$data[0]['qty']; $expireDate = date("d-m-Y", strtotime($data[0]['date_expire'])); $now = date("d-m-Y", time()); $qtyOrdered = (int)$item->getQtyOrdered(); $diff = $specialQty - $qtyOrdered; if ($specialQty == 0 || (strtotime($now) - strtotime($expireDate)) > 0 || $diff <= 0) { $this->deleteSpecialPrice($productId); continue; } $sql2 = "update prod...
...values to PHP Variables to indicate there is no active event. **CURRENT MySQL Queries** $sql = "SELECT eventdate FROM eventlist WHERE eventstatus = 'Active'"; $select = $db->prepare($sql); $select->execute(); $activeeventdateSQL = $select->fetch(PDO::FETCH_ASSOC); $activeeventdate = $activeeventdateSQL['eventdate']; $activecorrectedeventdate = date("l d F Y", strtotime($activeeventdate) ); $activeeventdateforlookup = date("Y-m-d", strtotime($activeeventdate) ); $actualusername = ($_SESSION['username']); // Lookup Active Event Host $sql = "SELECT hosttrack,eventname FROM eventlist WHERE eventstatus = 'Active'"; $select = $db->prepare($sql); $select->execute(); $activehosttrackSQ...
...$udata = get_userdata( $user-ID ); $registered = $udata->user_registered; printf( $table, 'Registered', date( "M Y", strtotime( $registered ) ) ); } ?> function wpb_user_registration_date($atts, $content = null ) { $userlogin = shortcode_atts( array( 'user' => FALSE, ), $atts ); $uname = $userlogin['user']; if ($uname!== FALSE) { $user = get_user_by( 'login', $uname ); if ($user == false) { $message ='Sorry no such user found.'; } else { $udata = get_userdata( $user-ID ); $registered = $udata->user_registered; $message = 'Member since: ' . date( "d F Y", strtotime( $registered ) ); } } else { ...
...2) Gecko/20090729 Firefox/3.5"); curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true); curl_setopt($curl, CURLOPT_COOKIEFILE, $cookie_file); curl_setopt($curl, CURLOPT_COOKIEJAR, $cookie_file); // SAME cookiefile $fromday = date('d', strtotime(' -0 day')); $frommonth = date('m', strtotime(' -0 day')); $fromyear = date('Y', strtotime(' -0 day')); $today = date('d', strtotime(' -0 day')); $tomonth = date('m', strtotime(' -0 day')); $toyear = date('Y', strtotime(' -0 day')); $todayDate = date('m/d/Y', strtotime(' -0 day')); $todayDate1 = date('Y/m/d', strtotime(' -0 day...
...Dates // Dynamically Enable Specific Dates */ add_filter( 'gpld_limit_dates_options_59_522', 'gpld_dynamic_exceptions', 10, 3 ); function gpld_dynamic_exceptions( $options, $form, $field ) { $date_values = array( '2019-06-01', '2019-06-07', '2019-06-15', '2019-06-27' ); // replace with your own method for getting a date $max_date = time(); foreach( $date_values as $date_value ) { $date_value = strtotime( $date_value ); if( $date_value > $max_date ) { $options['exceptions'][] = date( 'd/m/Y', $date_value ); } } $options['exceptionMode'] = 'enable'; $options['disableAll'] = true; return $options; } I have tried but failed... and here I am :) I'm assuming th...
Hello, I need to fix an Invalid argument supplied for foreach() Below is the code. Server is using php 7.3 $result1 = sql_query($db, "SELECT `date`,`rank` FROM `games` WHERE `ip` = " . $game['ip'] ....`date`,`rank` FROM `games` WHERE `ip` = " . $game['ip'] . " AND `port` = " . $game['port'] . " GROUP BY `date` DESC"); $rows1 = array(); $table1 = array(); $table1['cols'] = array( array( 'label' => 'date', 'type' => 'string' ) , array( 'label' => 'rank', 'type' => 'number' ) ); foreach($result1 as $r1) { $temp1 = array(); $temp1[] = array( 'v' => (string)date('m-d ga', strtotim...
...the data in the array to see if the data is between "Same Time" and "Different Time". If the data is different time then I am fetching the data from the array. My problem is that I am unable to send the email when I am using this code "$send_now = ($mail_day_cycle !== 0) ? (strtotime('-1 day') > strtotime($send_time) && $auto_responders[$mail_day_cycle]['day_cycle'] && $auto_responders[$mail_day_cycle]['enabled'] === 'yes') : true;" but if I use this "$send_now = ($mail_day_cycle !== 0) ? (strtotime('-1 day') < strtotime($send_time) && $auto_responders[$mail_day_cycle]['day_cycle'] && $auto_responders[$mail_day_cycle]['enab...
Hello i have code, <?php $pickuptime = date("H",strtotime($_COOKIE['stm_calc_pickup_date_1'] )); if($pickuptime > 9 && $pickuptime < 20 ){ $nonworking_pick = 0; }else{ $nonworking_pick = 10;} $returntime = date("H",strtotime($_COOKIE['stm_calc_return_date_1'] )); if($returntime > 9 && $returntime < 20 ){ $nonworking_return = 0; }else{ $nonworking_return = 10;} $total_non_working = $nonworking_return + $nonworking_pick; ; ?> <?php echo alg_convert_price( array( 'price' => $total_non_working ) ); ?> and need to moficate this code that if nothing is selected it should show 0
...alculate($product_info['special'], $product_info['tax_class_id'], $this->config->get('config_tax')), $this->session->data['currency']); ]]></search> <add><![CDATA[ $special = $this->model_catalog_product->getProductSpecialData($this->request->get['product_id']); if($special['date_end'] && $this->config->get('countdowntimer_product') && time() < strtotime($special['date_end'])){ $this->load->language('module/countdowntimer'); $this->data['special_end'] = $special['date_end']; $this->da...
Hi - I need some very quick help with displaying my date and time correctly in PHP - My Date format in the Database is displayed as 2018-11-03 12:48:09 I am trying to display the date only as D...My Date format in the Database is displayed as 2018-11-03 12:48:09 I am trying to display the date only as Day of week, 3rd of Month, Year I have tried the follow $mchpc_date = DateTime::createFromFormat('l jS of F Y', strtotime ($row["mchqc_date"])); $mchpc_date = DateTime::createFromFormat('F j, Y', strtotime ($row["mchqc_date"])); $mchqc_date = date("l jS of F Y,", strtotime($row["mchqc_date"])); $mchqc_date = date('l jS of F Y'); $mchqc_date = strtotime($row->mchq_date); ...
I need a Drupal 7 Token (module) that would output me current date plus n days. In php, I could get the date using `<?php $date = strtotime("+7 day"); echo date('d. M. Y', $date); ?>` (for 7 days offset), but I can’t make it work in Drupal 7.59. I must be available in Available tokens dialogue, where there would a custom token group `date_plus_days`. The module itself would be named `date_plus_days` or `Date Plus Days`. I don’t care what the description would be (make it clear with example output). Let me type `[date_plus_days:date_plus_days:#]` (where `#` is the offset int) as token. Ideally, it would be nice to have an option to define the date format from there, i.e. `[date_plus_days:date_plus_days:DATEFORMAT:#]` (just like we can in `[cur...
Need help to fix some bugs in existing PHP project ( Codeignitor framework ) 1. check duplicate value in form before insert into database ( need to add check data if value exists, before inser - to existing function ) 2. implement codeignitor date helper and change date print format to "d.m.Y" ( at the moment I use <td><?php echo date("d.m.Y", strtotime($i->create_date)); ?></td> but as in SQL table there is DEFAULT = NULL then in view "01.01.1970" 3. save todo list checked status into sql table and print status in view ( if user press checked, then update status completed=1 in task table ) +------------+------------+------+-----+-------------------+----------------+ | Field | Type | Null
I have a small .php file for a .csv import. I have having troubles getting the date to insert. I keep getting 1970-01-01. when i run the code in a seperate file I get the desired date I want. I have tried multiple solution...know date is in this format in the .csv file Jan/06/2018 and i have it converted to 2018-01-06 //$date_old = $line[0]; ---> this is for the line in the .csv file $date_old = "Nov/12/2017"; --> this is just for testing $pieces = explode("/", $date_old); $nmonth = date("m", strtotime($pieces[0])); $nday = $pieces[1]; $nyear = $pieces[2]; //$date = '$nyear."-".$nmonth."-".$nday'; $date = '$nyear-$nmonth-$nday'; --> when i displatyed this I got 2017-11-12 $da...
hi i learn the twig now and not find way to show time order only date on old php it's was strtotime($result['date_added']) to show time from mysql now i try found the command on twig need help
...0 ), array( 'db' => 'last_name', 'dt' => 1 ), array( 'db' => 'position', 'dt' => 2 ), array( 'db' => 'office', 'dt' => 3 , 'groupBy' => 'desc', ), array( 'db' => 'start_date', 'dt' => 4, 'groupby' => 'asc',  ...
I need to convert code from php to VB: $db = new PDO('mysql:host=localhost;dbname=testdb;charset=utf8', 'username', 'password'); $start = $_REQUEST['from'] / 1000; $end = $_REQUEST['to'] / 1000; $sql = sprintf('SELECT * FROM events WHERE `dateti...$_REQUEST['to'] / 1000; $sql = sprintf('SELECT * FROM events WHERE `datetime` BETWEEN %s and %s', $db->quote(date('Y-m-d', $start)), $db->quote(date('Y-m-d', $end))); $out = array(); foreach($db->query($sql) as $row) { $out[] = array( 'id' => $row->id, 'title' => $row->name, 'url' => Helper::url($row->id), 'start' => ...
<?php echo date("M Y", strtotime($eventsortdate)); ?> I need to be able to echo month name in 3 specific locales <?php if ( ICL_LANGUAGE_CODE=='fr' ) { echo date("M Y", strtotime($eventsortdate)); } elseif ( ICL_LANGUAGE_CODE=='en' ) { echo date("M Y", strtotime($eventsortdate)); } elseif ( ICL_LANGUAGE_CODE=='de' ) { echo date("M Y", strtotime($eventsortdate)); } ?> fr_FR, de_DE, en_UK
...//+------------------------------------------------------------------+ //| expert start function | //+------------------------------------------------------------------+ int count = 0; int start() { if(lockacc != "") { if((lockacc != AccountNumber())) { return(0); } else{} } else{} if(TimeCurrent() > StrToTime(expire_date)) { return(0); } else{} double max; double min ; double lot = Lots; int spread = MarketInfo(Symbol(),MODE_SPREAD); double profit = Ask+Point*(TP); double stoploss = Ask-Point*(SL); double sprofit = Bid-Point*(TP); double sstoploss = Bid+Point*(SL); for(int i = (Orders...
...customer buys a product/membership is taken to payment and completes checkout their details are copied into a file called "used_products" (be great to rename this) in this format // Get list of used products $prodids = file_get_contents(__DIR__ . "/"); $name = Am_Lite::getInstance()->getName(); foreach (Am_Lite::getInstance()->getAccess() as $a) { if ((strtotime($a['expire_date']) > strtotime("today")) && (!strstr($prodids, " - $a[access_id]n"))) { $access_id = $a['access_id']; $prod_id = $a['product_id']; $user_id = $a['user_id']; $expiry = $a['expire_date']; $begin = $a['begin_date']; } } User: 85 Begin: 2016-03-01 E...
...and confirms has paid and allowed the script in front of them to be made. If the user has not paid and click the button manually, they are given a error. function doScriptExec() { // Get list of used products $prodids = file_get_contents(__DIR__ . "/"); $name = Am_Lite::getInstance()->getName(); foreach (Am_Lite::getInstance()->getAccess() as $a) { if ((strtotime($a['expire_date']) > strtotime("today")) && (!strstr($prodids, " - $a[access_id]n"))) { $access_id = $a['access_id']; $prod_id = $a['product_id']; $user_id = $a['user_id']; $expiry = $a['expire_date']; $begin = $a['begin_date']; } } What i need is the following: If a u...
...LIMIT 0,30'; $db->setQuery($sql); $datas = $db->LoadObjectList(); $tourment_desc=""; } /* $db = JFactory::getDBO(); $sql = 'SELECT * FROM #__snap_G_video WHERE published=1 GROUP BY id ORDER BY created desc LIMIT 0,30'; $db->setQuery($sql); $datas = $db->LoadObjectList(); $tourment_desc=""; */ }else { $NewDate = date('Y-m-d H:i:s', strtotime("-3 days")); $db = JFactory::getDBO(); if($is_home=='1') { $sql = 'SELECT * FROM #__snap_G_video WHERE published=1 AND (created <= "'.$NewDate.'") GROUP BY id ORDER BY created desc LIMIT 0,10'; }else { $sql = 'SELECT * FROM #__sn...
...($mysqli->connect_errno) { printf("Connect failed: %sn", $mysqli->connect_error); exit(); } if ($_GET['sort'] == 'date') { $sort_query = 'outbounddeparture ASC';} else {$sort_query = 'priceperadult ASC';} $form_airport = $_GET['form_airport']; $form_lessthan = $_GET['less-than']; $from_month = $_GET['month']; $date = $from_month; $startdate = date("m", strtotime ( $date ) ); $enddate = date("m", strtotime ( '+1 month' , strtotime ( $date ) )); $destination = $_GET['form_destination']; if ($from_airport == 'LON') {$airport_query = " AND outbounddepartureairport IN ('LHR','LGW','ST...
Need to fix the time on my strtotime or day to be display the Months and Days in Arabic PHP Javascript+PHP Master Developer Need help to modify on my site need to start now. DEVELOPERS ONLY!! NO SALESMANS NO WAIST OF TIME, HARD WORKING DEVELOPERS ONLY!!! Helping fixing errors and adding changes to my site. Great coding skills required. Modifying the website.
Need to fix the time on my strtotime or day to be display the Months and Days in Arabic PHP Javascript+PHP Master Developer Need help to modify on my site need to start now. DEVELOPERS ONLY!! NO SALESMANS NO WAIST OF TIME, HARD WORKING DEVELOPERS ONLY!!! Helping fixing errors and adding changes to my site. Great coding skills required. Modifying the website.
Need to fix the time on my strtotime or day to be display the Months and Days in Arabic PHP Javascript+PHP Master Developer Need help to modify on my site need to start now. DEVELOPERS ONLY!! NO SALESMANS NO WAIST OF TIME, HARD WORKING DEVELOPERS ONLY!!! Helping fixing errors and adding changes to my site. Great coding skills required. Modifying the website.
Need to fix the time on my strtotime or day to be display the Months and Days in Arabic PHP Javascript+PHP Master Developer Need help to modify on my site need to start now. DEVELOPERS ONLY!! NO SALESMANS NO WAIST OF TIME, HARD WORKING DEVELOPERS ONLY!!! Helping fixing errors and adding changes to my site. Great coding skills required. Modifying the website.
Need to fix the time on my strtotime or day to be display the Months and Days in Arabic PHP Javascript+PHP Master Developer Need help to modify on my site need to start now. DEVELOPERS ONLY!! NO SALESMANS NO WAIST OF TIME, HARD WORKING DEVELOPERS ONLY!!! Helping fixing errors and adding changes to my site. Great coding skills required. Modifying the website.
Need to fix the time on my strtotime or day to be display the Months and Days in Arabic PHP Javascript+PHP Master Developer Need help to modify on my site need to start now. DEVELOPERS ONLY!! NO SALESMANS NO WAIST OF TIME, HARD WORKING DEVELOPERS ONLY!!! Helping fixing errors and adding changes to my site. Great coding skills required. Modifying the website.
...empty($xml->order->{'shipping-address'})) { $order = $xml->order; $order_item = $xml->order->{'order-item'}; $customer = $xml->order->customer; $shipping_address = $xml->order->{'shipping-address'}; $sql_order_value_arr['order_id'] = (string)$order['id']; $sql_order_value_arr['order_status'] = (string)$order->{'order-status'}; $sql_order_value_arr['order_date'] = date('d-m-Y h:i:s',strtotime((string)$order->{'order-date'})); $sql_order_value_arr['order_item_id'] = (string)$order_item['id']; $sql_order_value_arr['product_id'] = (string)$order_item->product['id']; $sql_orde...
Hi I'm not good in php I need someone to help me in an auth file, I've a link protected with a...fKg5sw0Dhy is visible, so I want to edit my php file to hide my token with a combination of md5, expiration after xx seconds and user ip. something like: ========================= date_default_timezone_set('UTC'); $ip = $_SERVER['REMOTE_ADDR'] = isset($_SERVER["HTTP_CF_CONNECTING_IP"]) ? $_SERVER["HTTP_CF_CONNECTING_IP"] : $_SERVER["REMOTE_ADDR"];; $mysecretkey = "fKg5sw0Dhy"; $expiry = strtotime("+50 seconds"); $b64 = base64_encode(md5($mysecretkey.$expiry.$ip,true)); $b64u = rtrim(str_replace(array('+','/'),array('-','_'),$b64),'='); echo &quo...
I have two queries I need updated. This is one: $expired = date( "Y-m-d", strtotime ("+2 day" ) ) ; $conn = mysql_connect("localhost", "username", "password"); mysql_select_db("database_name",$conn); $sql = "DELETE FROM EmailNotification WHERE expire_date <= '$expired'"; $result = mysql_query($sql); And the second is a query that check the database for new entries and sends members email if a new entry matches the category they have choose in the EmailNotification table. This is a NOW project.. to be done as quickly as possible. As soon as I test the script and it works I will pay as I always do.
Below are a few of the old ways I was successfully acquiring row counts. I need them changed using the PDO method. Looking for someone to complete these now. $result = mysql_query("SELECT Count(*) AS total FROM jobs WHERE PositionType='Campus Executives'"); $campusexec = mysql_result($result, 0, 'total'); $new = date( "Y-m-d", strtotime ("-2 day" ) ) ; $result = mysql_query("SELECT Count(*) AS total FROM jobs WHERE DatePosted >= '$lastweek' AND PositionType IN ('Police Executives','Fire/EMS Executives','Fire Inspector','Fire Marshal','Public Safety Executives','Sheriff Management','Campus Executives','Security Executives'...
please go to my website and view the errors i'm getting. i think it's a plug in problem but can't figure it out. Warning: strtotime() []: It is not safe to rely on the system's timezone settings. You are *required* to use the setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/Chicago' for 'CDT/-5.0/DST' instead in /home1/goesimag/public_html/ on line 56 thanks derek