} if ($use_server_time) { $time_f = time(); $one_hour = 60 * 60; if ($daylight_saving) { // apply DST correction if set in config $time_f = $time_f + $one_hour; } $time_f = $time_f - $c_startup_delay_secs; $t_mins = date("i"); // for twitter $t_hours = date("H"); // for twitter } else { // otherwise constuct unix timestamp from the supplied vars if (checkTime()) { $time_f = mktime($t_hours, $t_mins, 0, $d_month, $d_date, $d_year); } else { die("The supplied time variables were not valid."); } } // ok, if we got to here everything is cool variable-wise // let's get the data into the db db_connect(); $query = "INSERT INTO records VALUES (\r\nnull,\r\n'" . sanitize($time_f) . "',\r\n'" . sanitize($light) . "',\r\n'" . sanitize($moisture) . "',\r\n'" . sanitize($wind_dir) . "',\r\n'" . sanitize($wind_spd) . "',\r\n'" . sanitize($pressure) . "',\r\n'" . sanitize($temp) . "',\r\n'" . sanitize($humidity) . "',\r\n'" . sanitize($batt) . "',\r\n'" . sanitize($temp2) . "',\r\n'" . sanitize($rain) . "',\r\n'" . sanitize($light2) . "',\r\n'" . $ip . "')"; mysql_query($query) or die("Could not run query.<br>" . mysql_error()); db_disconnect(); // this header is for the XPORT serin stuff // ... when we get it working // ... if ever header("Zone: D");
print $msg; } // Don't put this into production - can reveal secrets print "\n<!--\n" . getDebugLogXML() . "\n-->\n"; } // Only do the launch processing if we have an action parameter if ($_REQUEST[action] == 'launchresolve' || $_REQUEST[action] == 'direct' || $_REQUEST[action] == 'launchhtml') { DPRT("Handling incoming Launch POST"); if ($_REQUEST[sec_nonce] && $_REQUEST[sec_created] && $_REQUEST[sec_digest] && $_REQUEST[user_id] && $_REQUEST[course_id] && $_REQUEST[user_role]) { // Good to continue } else { lti_launchfail("Missing required launch parameter (sec_nonce, sec_created, sec_digest, user_id, course_id, launch_request_id, and user_role) see simplelti.appspot.com"); exit; } // Check the time - reject if too old if (!checkTime($_REQUEST[sec_created], $Settings["nonce_time"])) { lti_launchfail("Nonce computation failed (expired) see simplelti.appspot.com"); exit; } // Check to see if the digest is right and within the specified time. require_once "db.php"; // Check the digest for one-time use - discard if a replay $digest = mysql_real_escape_string($_REQUEST[sec_digest]); $quer = "SELECT id FROM lti_digest WHERE digest='{$digest}'"; DPRT($quer); $result = mysql_query($quer); $num_rows = mysql_num_rows($result); DPRT($num_rows); if ($num_rows > 0) { if ($Settings['allow_digest_reuse']) { DPRT("Reused existing launch - only do this when debugging");
</div> <div id="con_one_3" style="display:none"> <ul id="other_items"> <?php if(!empty($output['goods_commend3']) && is_array($output['goods_commend3'])){?> <?php foreach ($output['goods_commend3'] as $val3){?> <li> <div class="pic"> <span class="thumb size160"> <i></i> <a title="<?php echo $val3['goods_name'] ?>" href="index.php?act=flea_goods&type=goods&goods_id=<?php echo $val3['goods_id']?>"><img height="160" width="160" onload="javascript:DrawImage(this,160,160);" src="<?php echo $val3['goods_image'] != '' ? UPLOAD_SITE_URL.DS.ATTACH_MALBUM.DS.$val3['member_id'].DS.$val3['goods_image'] : SHOP_TEMPLATES_URL.'/images/member/default_image.png';?>"></a> </span> </div> <h3><a href="index.php?act=flea_goods&type=goods&goods_id=<?php echo $val3['goods_id']?>"><?php echo $val3['goods_name']?></a></h3> <span class="price"><?php echo $lang['currency'];?><b><?php echo $val3['goods_store_price']?></b></span> <span class="time"><?php echo checkTime($val3['goods_add_time']);?><?php echo $lang['flea_index_front'];?></span> </li> <?php }?> <?php }?> </ul> </div> </div> </div> <div class="fn-clear"></div> <div> <div id="tb-detail-tips"> <div id="J_tb-buy-tips" class="tb-buy-tips clearfix"> <ul> <li><?php echo $lang['flea_explain_before_buy1'];?></li> <li><?php echo $lang['flea_explain_before_buy2'];?></li>
<h3><a href="index.php?act=flea_goods&type=goods&goods_id=<?php echo $val3['goods_id']; ?> "><?php echo $val3['goods_name']; ?> </a></h3> <span class="price"><?php echo $lang['currency']; ?> <b><?php echo $val3['goods_store_price']; ?> </b></span> <span class="time"><?php echo checkTime($val3['goods_add_time']); echo $lang['flea_index_front']; ?> </span> </li> <?php } ?> <?php } ?> </ul> </div> </div> </div>
/** FOOT 스크립트 * @class default * @param $name: description * @return */ function foot($param = '') { global $mini; $param = param($param); iss($mini['set']['debug']); checkTime('all'); /* if (!empty($mini['set']['debug'])) { echo " <script type='text/javascript'> //<![CDATA[ error(\"[실행시간]".nl2br2(printTime($mini['set']['debug'], 1))."\"); //]]> </script> "; } */ if ($mini['head']) { // 게시판 푸터 if (!empty($mini['board']['footer']) && !empty($mini['is_layout'])) { echo $mini['board']['footer']; } if (!empty($mini['board']['footer_url']) && !empty($mini['is_layout'])) { include $mini['board']['footer_url']; } echo "\n<!--endTheM-->\n</body>\n</html>\n"; $mini['foot'] = 1; } // sql 닫기 iss($mini['sql']); if (is_array($mini['sql'])) { foreach ($mini['sql'] as $val) { sqlClose($val); } } // ob_end 적용 if (!empty($mini['ob_start'])) { @ob_end_flush(); unset($mini['ob_start']); } }
/** 페이지 목폭 출력 * @class list * @param -skin: 일반 스킨 [page, link_page, url] -skin_now: 현재페이지 스킨 [page, link_page, url] -name: 리스팅 변수배열 이름 -firtName: 첫페이지 가기 링크 텍스트 -lastName: 마지막페이지 가기 링크 텍스트 -is_viewLink: 첫,마지막페이지 링크 보이기 -skip_page_no: 페이징 할 떄 no 를 스킵할지 여부 * @return String 페이지목록 */ function getPage($param = '') { global $mini; $param = param($param); //// 기본설정 def($param['name'], 'default'); $data =& $mini['list'][$param['name']]; def($param['firstName'], "FIRST"); def($param['lastName'], "LAST"); def($param['is_viewLink'], 1); def($param['skip_page_no'], 0); iss($data['start']); iss($data['is_order']); iss($data['nowDiv']); iss($output); $result = array(); if (empty($data['is_notpage'])) { if (!empty($data['is_simple'])) { $startPage = $data['page'] - $data['page'] % 10 + 1; $lastPage = $data['tp'] >= $startPage + 9 ? $startPage + 9 : $data['tp']; } else { $startPage = ($data['nowDiv'] - 1) * 10 + 1; $lastPage = $data['tp'] >= $startPage + 9 ? $startPage + 9 : $data['tp']; } $output = ""; $outPage = array(); if ($startPage < 1) { $startPage = 1; } //// 페이지 구하기 if ($param['is_viewLink'] && $data['page'] != 1) { $outPage[] = "first"; } if ($data['page'] > 10) { $outPage[] = "prev"; } for ($a = $startPage; $a <= $lastPage; $a++) { $outPage[] = $a; } if ($data['page'] < $data['tp'] && $lastPage < $data['tp']) { $outPage[] = "next"; } if ($param['is_viewLink'] && $data['page'] != $data['tp']) { $outPage[] = "last"; } if ($lastPage < 1 && count($outPage) == 0) { $outPage[] = 1; } //// 페이지 출력하기 foreach ($outPage as $key => $val) { $selectSkin = $val == $data['page'] ? "skin_now" : "skin"; $val_start = $val_div = ''; $tmp_val = $val; switch ($val) { // 첫 페이지 case "first": $val2 = 1; $val = $param['firstName']; break; // 마지막 페이지 // 마지막 페이지 case "last": $val2 = $data['tp']; $val = $param['lastName']; break; // 이전 영역 // 이전 영역 case "prev": $val = $val2 = $startPage - 1; if ($data['start'] && $data['is_order'] && !$data['is_simple']) { checkTime("query_prev"); if ($data['key']) { // $data['debug_prev'] = "SELECT DISTINCT({$data['fieldName']}) FROM {$data['keyTable']} USE KEY ({$data['fieldName']}) WHERE {$data['fieldName']}".(preg_match("/order by [a-z0-9_]+ desc/i", $data['order']) ? ">=" : "<=")."{$data['start']} ".str_replace("WHERE ", "and ", $data['where'])." {$data['order_desc']} LIMIT ".($data['list'] * 10).", 1"; $data['debug_prev'] = "SELECT DISTINCT({$data['fieldName']}) FROM {$data['keyTable']} WHERE {$data['fieldName']}" . (preg_match("/order by [a-z0-9_]+ desc/i", $data['order']) ? ">=" : "<=") . "{$data['start']} " . str_replace("WHERE ", "and ", $data['where']) . " {$data['order_desc']} LIMIT " . $data['list'] * 10 . ", 1"; } else { // $data['debug_prev'] = "SELECT {$data['fieldName']} FROM {$data['table']} USE KEY ({$data['fieldName']}) WHERE {$data['fieldName']}".(preg_match("/order by [a-z0-9_]+ desc/i", $data['order']) ? ">=" : "<=")."{$data['start']} ".str_replace("WHERE ", "and ", $data['where'])." {$data['order_desc']} LIMIT ".($data['list'] * 10).", 1"; $data['debug_prev'] = "SELECT {$data['fieldName']} FROM {$data['table']} WHERE {$data['fieldName']}" . (preg_match("/order by [a-z0-9_]+ desc/i", $data['order']) ? ">=" : "<=") . "{$data['start']} " . str_replace("WHERE ", "and ", $data['where']) . " {$data['order_desc']} LIMIT " . $data['list'] * 10 . ", 1"; } $val_start = sql($data['debug_prev']); checkTime("query_prev"); $val_div = $data['nowDiv'] - 1; } else { } break; // 다음 영역 // 다음 영역 case "next": $val = $val2 = $lastPage + 1; if ($data['start'] && $data['is_order'] && !$data['is_simple']) { checkTime("query_next"); if ($data['key']) { // $val_start = sql("SELECT DISTINCT({$data['fieldName']}) FROM {$data['keyTable']} USE KEY ({$data['fieldName']}) WHERE {$data['fieldName']}".(preg_match("/order by [a-z0-9_]+ desc/i", $data['order']) ? "<=" : ">=")."{$data['start']} ".str_replace("WHERE ", "and ", $data['where'])." {$data['order']} LIMIT ".($data['list'] * 10).", 1"); $val_start = sql("SELECT DISTINCT({$data['fieldName']}) FROM {$data['keyTable']} WHERE {$data['fieldName']}" . (preg_match("/order by [a-z0-9_]+ desc/i", $data['order']) ? "<=" : ">=") . "{$data['start']} " . str_replace("WHERE ", "and ", $data['where']) . " {$data['order']} LIMIT " . $data['list'] * 10 . ", 1"); } else { // $val_start = sql("SELECT {$data['fieldName']} FROM {$data['table']} USE KEY ({$data['fieldName']}) WHERE {$data['fieldName']}".(preg_match("/order by [a-z0-9_]+ desc/i", $data['order']) ? "<=" : ">=")."{$data['start']} ".str_replace("WHERE ", "and ", $data['where'])." {$data['order']} LIMIT ".($data['list'] * 10).", 1"); $val_start = sql("SELECT {$data['fieldName']} FROM {$data['table']} WHERE {$data['fieldName']}" . (preg_match("/order by [a-z0-9_]+ desc/i", $data['order']) ? "<=" : ">=") . "{$data['start']} " . str_replace("WHERE ", "and ", $data['where']) . " {$data['order']} LIMIT " . $data['list'] * 10 . ", 1"); } checkTime("query_next"); $val_div = $data['nowDiv'] + 1; } else { } break; default: $val2 = $val; $val_start = $data['start']; $val_div = $data['nowDiv']; } // url 생성 $url = "{$data['pageName']}={$val2}"; if ($val_start) { $url .= "&{$data['startName']}={$val_start}"; } if ($val_div) { $url .= "&{$data['divName']}={$val_div}"; } $url .= getURI((!empty($data['skip_page_no']) ? "no, " : "") . "{$data['pageName']}, {$data['divName']}, {$data['startName']}"); // 결과 배열에 저장 if ($tmp_val == 'prev') { $result[$outPage[$key + 1] - 1] = str_replace("&", "&", "{$_SERVER['PHP_SELF']}?{$url}"); } else { if ($tmp_val == 'next') { $result[$outPage[$key - 1] + 1] = str_replace("&", "&", "{$_SERVER['PHP_SELF']}?{$url}"); } else { if ($tmp_val != 'first' && $tmp_val != 'last') { $result[$tmp_val] = str_replace("&", "&", "{$_SERVER['PHP_SELF']}?{$url}"); } } } $output .= str_replace(array("[:page:]", "[:pageNum:]", "[:link_page:]", "[:url:]"), array($val, $val2, "href='{$_SERVER['PHP_SELF']}?{$url}'", "{$_SERVER['PHP_SELF']}?{$url}"), $param[$selectSkin]); } // prev, next 구하기 if (!empty($data['page'])) { $data['url_prev'] = !empty($result[$data['page'] - 1]) ? $result[$data['page'] - 1] : $result[1]; $data['url_next'] = !empty($result[$data['page'] + 1]) ? $result[$data['page'] + 1] : $result[$data['tp']]; } } return $output; }
function printMonth($year, $month, $selected, $selectedType1 = 'day') { global $area, $room; switch ($selectedType1) { case 'week': $selectedType = 'week'; break; case 'month': $selectedType = 'month'; break; default: // day $selectedType = 'day'; break; } $monthTime = mktime(0, 0, 0, $month, 1, $year); $monthLast = mktime(0, 0, 0, $month + 1, 1, $year); $numDays = date('t', $monthTime); $startWeek = date('W', $monthTime); $room = (int) $room; $checkTime = checkTime($monthTime, $monthLast, $area, $room); echo '<table style="width: 100%;">' . chr(10); echo ' <tr><td class="B"><center><b><a class="graybg" href="month.php?year=' . date('Y', $monthTime) . '&month=' . date('m', $monthTime) . '&day=1&area=' . $area . '&room=' . $room . '">'; if ($selectedType == 'month') { echo '<font color="red">' . _(date('M', $monthTime)) . ' ' . date('Y', $monthTime) . '</font>'; } else { echo _(date('M', $monthTime)) . ' ' . date('Y', $monthTime); } echo '</b></center></td>'; echo '</tr>' . chr(10); echo ' <tr>' . chr(10); echo ' <td>' . chr(10); echo ' <table>' . chr(10); $printedWeeks = array(); $firstWeek = true; for ($i = 1; $i < $numDays + 1; $i++) { $thisWeek = date('W', mktime(0, 0, 0, $month, $i, $year)); // If this week isn't printed, lets print it if (!in_array($thisWeek, $printedWeeks)) { if ($firstWeek) { $firstWeek = false; } else { echo ' </tr>' . chr(10); } echo ' <tr>' . chr(10); echo ' <td class="weeknum"><center>' . '<a class="graybg" href="week.php?year=' . date('Y', $monthTime) . '&month=' . date('m', $monthTime) . '&day=' . $i . '&area=' . $area . '&room=' . $room . '">'; // Is it selected? if ($selectedType == 'week' && $selected == $thisWeek) { echo '<font color="red">' . $thisWeek . '</font>'; } else { echo $thisWeek; } echo '</a></center></td>' . chr(10); echo ' <td> </td>' . chr(10); // Checking the weekday and adding spaces switch (date('w', mktime(0, 0, 0, $month, $i, $year))) { case '0': // Sunday echo ' <td> </td>' . chr(10); case '6': // Saturday echo ' <td> </td>' . chr(10); case '5': // Friday echo ' <td> </td>' . chr(10); case '4': // Thursday echo ' <td> </td>' . chr(10); case '3': // Wednesday echo ' <td> </td>' . chr(10); case '2': // Tuesday echo ' <td> </td>' . chr(10); case '1': // Mondag, non added break; } $printedWeeks[] = $thisWeek; } echo ' <td><center><a href="day.php?year=' . date('Y', $monthTime) . '&month=' . date('m', $monthTime) . '&day=' . $i . '&area=' . $area . '&room=' . $room . '">'; $ymd = date('Y', $monthTime); if (strlen(date('m', $monthTime)) == 1) { $ymd .= '0'; } $ymd .= date('m', $monthTime); if (strlen($i) == 1) { $ymd .= '0'; } $ymd .= $i; if (isset($checkTime[$ymd])) { echo '<b>'; } if ($selectedType == 'day' && $selected == $i) { echo '<font color="red">' . $i . '</font>'; } else { echo $i; } if (isset($checkTime[$ymd])) { echo '</b>'; } echo '</a></center></td>' . chr(10); } echo ' </tr>' . chr(10); echo ' </table>' . chr(10); echo ' </tr>' . chr(10); echo ' </tr>' . chr(10); echo '</table>' . chr(10); }
/** * 게시판 삭제 * @class admin.board * @param $no: 대상번호 * @return */ function delBoard($no) { global $mini; //// 게시판 번호 if (!is_array($no)) { $tmp = $no; $no = array(); $no[0] = $tmp; } foreach ($no as $key => $val) { //// 번호 체크 check($val, "type:num, name:게시판번호"); //// 데이터 로드 $data_ex = sql("SELECT * FROM {$mini['name']['admin']} WHERE no={$val}"); if (!is_array($data_ex)) { __error('해당 게시판이 존재하지 않습니다'); } //// 권한체크 checkAdmin("\n\t\t\t\tsite: {$data_ex['site']}\n\t\t\t\ttype: ajax\n\t\t\t"); //// 쿼리 checkTime("delAdmin"); sql("DELETE FROM {$mini['name']['admin']} WHERE no={$val}"); checkTime("delAdmin"); //// 게시판 제거 쿼리 checkTime("delData"); sql("DROP TABLE {$mini['name']['board']}{$data_ex['no']}"); sql("DROP TABLE {$mini['name']['cmt']}{$data_ex['no']}"); checkTime("delData"); //// 관련 자료 제거 sql("DELETE FROM {$mini['name']['search']} WHERE id={$data_ex['no']}"); sql("DELETE FROM {$mini['name']['file']} WHERE id={$data_ex['no']}"); sql("DELETE FROM {$mini['name']['report']} WHERE id={$data_ex['no']}"); sql("DELETE FROM {$mini['name']['trash']} WHERE id={$data_ex['no']}"); sql("DELETE FROM {$mini['name']['counter']} WHERE id={$data_ex['no']}"); sql("DELETE FROM {$mini['name']['counter_log']} WHERE id={$data_ex['no']}"); //// 자료 폴더 제거 if (is_dir("{$mini['dir']}file/{$data_ex['dir']}")) { rename("{$mini['dir']}file/{$data_ex['dir']}", "{$mini['dir']}file/_deleted_{$data_ex['dir']}"); } //// 로그 기록 addLog(array('mode' => 'board_del', 'field1' => $data_ex['no'], 'ment' => $data_ex)); } }
<?php /* Standard include */ require_once '../functions/functions.php'; /* Check User rights */ checkMinGroup(1); if ($_GET['do'] == 'offerride') { $time = checkTime($_GET['time']); $time_ok = true; if (!only_digits($time)) { $time_ok = false; $e_msg = t('Time: ') . $time; addErrorMessage($e_msg); c2r_log_error('Offer time format', $e_msg . ' - ' . $_GET['time']); } $route = c2r_routes_get($_GET['route_id']); $sdate = explode('-', $_GET['start_date']); $sdate = join('', $sdate); if (!count($errors)) { $result = c2r_offer_ride($_GET['user_number_id'], $_GET['location_id'], $route->key, $time, $_GET['reverse'], $sdate); if ($result && substr($result, 0, 5) != 'ERROR') { addInfoMessage($result); header("Location: " . OCP_BASE_URL . "matchingrequests.php"); /* Redirect browser */ exit; } else { $e_msg = $result ? $result : t('An error occurred'); addErrorMessage($e_msg); c2r_log_error('Offer time format', $e_msg); } }
function gm($att, $content = null){ global $apiKey, $apiSec, $apiTok, $apiTokSec, $username , $userID, $hash, $json, $cords, $styles, $mapmarker, $c1, $c2, $options; require_once "twitter/index.php"; try{ checkStream($json); if($hash == ""){ if(isset($json[0]->entities->media[0]->media_url)){ $image = '<img src="'.$json[0]->entities->media[0]->media_url.'">'; } $tweetcontent = linkHash($json[0]->text); } else{ $e = $json[0]->entities->hashtags; if(isset($e[0]->text ) and $e[0]->text == $hash){ if(isset($json[0]->entities->media[0]->media_url)){; $image = '<img src="'.$json[0]->entities->media[0]->media_url.'">'; } $cords = getCords($json[0]->place->bounding_box->coordinates[0]); $tweetcontent = linkHash($json[0]->text); $t = $json[0]->created_at; } else{ foreach ($json as $fdtruck) { $foundhash = strpos($fdtruck->text, $hash); if( ($foundhash) ) { $cords = getCords($fdtruck->place->bounding_box->coordinates[0]); $tweetcontent = linkHash($fdtruck->text); if(isset($fdtruck->entities->media[0]->media_url)){ $url = "http://twitter.com/".$username."/status/".$fdtruck->id_str; $image = '<img src="'.$fdtruck->entities->media[0]->media_url.'">'; } $t = $fdtruck->created_at; break; } } } } if((isset($cords) ) or (is_array($cords) ) or ($cords[0] != "") ){ if(checkTime($t)){ $c1 = $options['rLAT']; $c2 = $options['rLONG']; $mapmarker = $options['rMark']; $tcontent = ""; } else{ $c1 = $cords[1]; $c2 = $cords[0]; $mapmarker = $options["mapmarker"]; $tcontent = '<div id="tweetBubble"><div class="content">'.$tweetcontent.'</div><div class="image"><div class="container"><a href="'.$url.'" target="_blank">'.$image.'</a></div></div></div>'; } } else{ $c1 = $options['rLAT']; $c2 = $options['rLONG']; $mapmarker = $options['rMark']; $tcontent = ""; } ?> <script type="text/javascript"> var hashtag = "<?php echo $hash; ?>"; var styles = <?php echo $styles; ?>; var styledMap = new google.maps.StyledMapType(styles, {name: "Styled Map"}); var zoom = 15; var infoContent = '<?php echo $tcontent; ?>'; var map; var tLocation = new google.maps.LatLng(<?php echo $c1; ?>, <?php echo $c2; ?>) function CoordMapType(tileSize) { this.tileSize = tileSize; } CoordMapType.prototype.getTile = function(coord, zoom, ownerDocument) { var div = ownerDocument.createElement('div'); div.style.width = this.tileSize.width + 'px'; div.style.height = this.tileSize.height + 'px'; div.style.fontSize = '1'; return div; }; function initialize() { var mapOptions = { zoom : zoom, scrollwheel: false, draggable : <?php if(is_mobile() or is_tablet()) echo 'false'; else echo 'true'; ?>, center : tLocation }; map = new google.maps.Map(document.getElementById('myMap'), mapOptions); var iconBase = 'https://maps.google.com/mapfiles/kml/shapes/'; var marker = new google.maps.Marker({ position: tLocation, map: map, title: 'Twitter', icon: '<?php echo $mapmarker; ?>' }); var infowindow = new google.maps.InfoWindow({ content: infoContent }); marker.setMap(map); // Insert this overlay map type as the first overlay map type at // position 0. Note that all overlay map types appear on top of // their parent base map. map.overlayMapTypes.insertAt( 0, new CoordMapType(new google.maps.Size(256, 256)) ); google.maps.event.addListener(marker, 'click', function() { infowindow.open(map,marker); }); map.mapTypes.set('map_style', styledMap); map.setMapTypeId('map_style'); } google.maps.event.addDomListener(window, 'load', initialize); </script> <? $output = ""; $output .= '<div class="spinner"><div id="myMap" class="gmap custom-row row-style-yes row-parallax-bg parallax-bg-done" style="height:500px; width:100%"></div></div>'; return $output; } catch(Exception $e){ return "Opps Looks like Twitter is having issues.<br> " .$e->getMessage(); } }
function getTVMessages($date, $area) { //CHANGE: add a date varaible so we can pick the date/day we want tasks for global $db; $debug = 0; $rtlist = "<tr> "; //set the variables for the day of the week and the date that we want the tasks for $dayOfWeek = strtolower(date('D', strtotime($date))); try { $list4Query = $db->prepare("CALL createTaskList(:day,:dayOfWeek,:area)"); $list4Query->execute(array(':day' => $date, ':dayOfWeek' => $dayOfWeek, ':area' => $area)); } catch (PDOException $e) { exit("error in query"); } $firstIncomplete = 0; $sound = 0; while ($taskList = $list4Query->fetch(PDO::FETCH_ASSOC)) { if ($taskList['completed'] == 1) { //If Completed text is green. echo "<td><font color='#008500'><b>" . $taskList['timeDue'] . "</b></font></td>"; echo "<td><font color='#008500'>" . $taskList['title'] . "</font></td>"; echo "<td><font color='#008500'>" . $taskList['timeCompleted'] . "</font></td>"; echo "<td><font color='#008500'>" . $taskList['completedBy'] . "</font></td>"; } else { if ($taskList['muted'] == 1) { //If Muted texted is Red echo "<td><font color='#FF7400'><b>" . $taskList['timeDue'] . "</b></font>"; if ($firstIncomplete == 0) { $firstIncomplete = 1; echo "<a name='incomplete'></a>"; } echo "</td>"; echo "<td><font color='#FF7400'>" . $taskList['title'] . "</font></td>"; echo "<td><font color='#FF7400'>Muted At: " . $taskList['timeMuted'] . "</font><br /></td>"; echo "<td><font color='#FF7400'>Muted By: " . $taskList['mutedBy'] . "</font></td>"; } else { echo "<td>"; if (checkTime($taskList['timeDue'], $date)) { if ($firstIncomplete == 0) { $firstIncomplete = 1; echo '<a id="incomplete"> </a>'; } if ($sound == 0) { echo "<embed src='../includes/sounds/routine19.mp3' hidden='true' autostart='true' loop='false' />"; $sound = 1; } echo "<font color='red'><b>" . $taskList['timeDue'] . "</b></font></td>"; echo "<td><font color='red'>" . $taskList['title'] . "</font></td>"; echo "<td></td><td></td>"; } else { if ($firstIncomplete == 0) { $firstIncomplete = 1; echo '<a id="incomplete"> </a>'; } echo "<b>" . $taskList['timeDue'] . "</b></td>"; echo "<td>" . $taskList['title'] . "</td>"; echo "<td></td><td></td>"; } } } echo "</tr>"; } }
<?php /* Standard include */ require_once '../functions/functions.php'; /* Check User rights */ checkMinGroup(1); if (count($_GET)) { $sdate = explode('-', $_GET['start_date']); $sdate = join('', $sdate); $time_earliest = checkTime($_GET['time_earliest']); $time_latest = checkTime($_GET['time_latest']); $has_error = false; if (!only_digits($time_earliest)) { $has_error = true; $e_msg = 'Time earliest: ' . $time_earliest; addErrorMessage($e_msg); c2r_log_error('Request time format', $e_msg . ' - ' . $_GET['time_earliest']); } if (!only_digits($time_latest)) { $has_error = true; $e_msg = t('Time latest: ') . $time_latest; addErrorMessage($e_msg); c2r_log_error('Request time format', $e_msg . ' - ' . $_GET['time_latest']); } // Check if earliest before latest if (!$has_error && $time_latest < $time_earliest) { $has_error = true; $e_msg = t('The latest start time is before earliest start time: ') . $time_latest . ' < ' . $time_earliest . t(' Please change the order.'); addErrorMessage($e_msg); c2r_log_error('Request time order', $e_msg); }
$fp = fopen("@db_b_{$a}.sql", "r"); $query_board .= fread($fp, filesize("@db_b_{$a}.sql")); fclose($fp); */ // /* $fp = fopen("@db_s_{$a}.sql", "r"); $query_search .= fread($fp, filesize("@db_s_{$a}.sql")); fclose($fp); // */ } echo "입력중...<br />"; flush(); checkTime("query"); //mysql_query($query_board) or die(mysql_error()); mysql_query($query_search) or die(mysql_error()); checkTime("query"); echo "all complete!!"; printTime(1); exit; ?> <?php exit; iss($_GET['start']); def($start, $_GET['start']); def($start, 1); $count = 50000; $start_num = 16000000 - ($start - 1) * $count;