<?php // Get global file path function GetFileDir($php_self) { $filename2 = ''; $filename = explode("/", $php_self); // THIS WILL BREAK DOWN THE PATH INTO AN ARRAY for ($i = 0; $i < count($filename) - 2; ++$i) { $filename2 .= $filename[$i] . '/'; } return $filename2; } // General settings per resort from database $general = array(); $general = querySQL('settings_inc'); if ($_SESSION['valid_user'] == TRUE) { $_SESSION['language'] = $general['language']; } // Set default timezone in PHP 5. if (function_exists('date_default_timezone_set')) { date_default_timezone_set($general['timezone']); } /* Set PHP local */ setlocale(LC_TIME, $general['language']); /* Set global base path */ $global_basedir = ''; if (isset($_SERVER['HTTPS'])) { $global_basedir = 'https://'; } else { $global_basedir = 'http://';
if ($_SESSION['page'] == 1) { $reservations = querySQL('all_reservations'); } else { $reservations = querySQL('reservations'); } if ($reservations) { // reset total counters $tablesum = 0; $guestsum = 0; //start printing out reservation grid foreach ($reservations as $row) { // reservation ID $id = $row->reservation_id; $_SESSION['reservation_guest_name'] = $row->reservation_guest_name; // check if reservation is tautologous $tautologous = querySQL('tautologous'); echo "<tr id='res-" . $id . "'>"; echo "<td"; // reservation after maitre message if ($row->reservation_timestamp > $maitre['maitre_timestamp'] && $maitre['maitre_comment_day'] != '') { echo " class='tautologous' title='" . _sentence_13 . "' "; } echo ">"; // old reservations symbol if (strtotime($row->reservation_timestamp) + $general['old_days'] * 86400 <= time()) { echo "<img src='images/icons/clock-bolt.png' class='help tipsyold middle smicon' title='" . _sentence_11 . "' />"; } else { // daylight coloring if ($row->reservation_time > $daylight_evening) { echo "<img src='images/icons/clock-moon.png' class='middle smicon'/>"; } else {
executeSQL($conn, $sql); $sql = "\n\t\t\t\t\t\tupdate tbl_user a,\n\t\t\t\t\t\t(\n\t\t\t\t\t\tselect a.userid, a.macid\n\t\t\t\t\t\tfrom tbl_user_macid a,\n\t\t\t\t\t\t(select userid, max(update_date) as update_date from tbl_user_macid where delete_flag=0 group by userid) b\n\t\t\t\t\t\twhere a.delete_flag=0 and a.userid=b.userid and a.update_date=b.update_date\n\t\t\t\t\t\t) b\n\t\t\t\t\t\tset a.macid = b.macid\n\t\t\t\t\t\twhere a.id = b.userid and a.id=" . correctSQL($old_uid); executeSQL($conn, $sql); } // set macid $sql = "insert into tbl_user_macid (userid, macid, create_id, create_date, update_id, update_date)\n\t\t\t\t\t\t\t\tVALUES('" . toStringForSql($uid) . "', '" . toStringForSql($macid) . "', '" . toStringForSql($userid) . "', now(), '" . toStringForSql($userid) . "', now())"; executeSQL($conn, $sql); $sql = "update tbl_user set macid='" . toStringForSql($macid) . "' where id='" . toStringForSql($uid) . "'"; executeSQL($conn, $sql); } // activate online payment if ($activation == 1) { $sql = "update tbl_user set activation=0 where id='" . toStringForSql($uid) . "'"; executeSQL($conn, $sql); $sql = "select userid, serviceid, start_date, end_date from tbl_user_status where userid='" . toStringForSql($uid) . "' and delete_flag=0"; $result = querySQL($conn, $sql); $row = mysql_fetch_array($result); $start_date = $row["start_date"]; $now = date("Y-m-d"); $end_date = $row["end_date"]; $days = ceil((strtotime($now) - strtotime($start_date)) / (60 * 60 * 24)); $y = intval(substr($start_date, 0, 4)); $m = intval(substr($start_date, 5, 2)); $d = intval(substr($start_date, 8, 2)); $start_date = date('Y-m-d', mktime(0, 0, 0, $m, $d + $days, $y)); $y = intval(substr($end_date, 0, 4)); $m = intval(substr($end_date, 5, 2)); $d = intval(substr($end_date, 8, 2)); $end_date = date('Y-m-d', mktime(0, 0, 0, $m, $d + $days, $y)); $sql = 'update tbl_user_status' . ' set start_date=' . correctSQL(substr($start_date, 0, 10)) . ' , end_date=' . correctSQL(substr($end_date, 0, 10)) . ' where userid=' . $uid . ' and delete_flag=0'; executeSQL($conn, $sql);
<? $events = querySQL('db_propery_events'); if ($events) { // remember original session outlet id $mem_id = $_SESSION['outletID']; foreach($events as $row) { $_SESSION['outletID'] = $row->outlet_id; echo "<tr id='events-".$row->id."'>"; echo "<td><span class='bold'>".date($general['dateformat'],strtotime($row->event_date))."</strong></td> <td><span class='bold'><a href='?p=6&q=4&btn=3&eventID=".$row->id."'>".$row->subject."</a></strong> <a href='main_page.php?p=2&outletID=".$row->outlet_id."&selectedDate=".$row->event_date."' style='margin-left:12px;'> <img src='images/icons/arrow.png'/></a> </td> <td>".querySQL('db_outlet')."</td> <td>".formatTime($row->start_time,$general['timeformat'])."</td> <td>".formatTime($row->end_time,$general['timeformat'])."</td>"; //<td>".$row->open_to."</td> //<td><small>".$row->contact."</small></td> echo "<td>".$row->advertise_start." "._days." "._before."</td> <td>".number_format($row->price,2)."</td> <td> <a href='#modaldelete' name='events' id='".$row->id."' class='deletebtn'> <img src='images/icons/delete_cross.png' alt='"._cancelled."' class='help' title='"._delete."'/> </a> </td> </tr>"; } //get back original session outlet id $_SESSION['outletID'] = $mem_id;
<?php require_once 'functions.php'; $tempEmail = $_POST['email']; $tempUser = $_POST['user']; $tempNewPass = $_POST['newPass']; $sql = "SELECT * FROM (solitaire) WHERE (email) LIKE ('{$tempEmail}') AND (user) LIKE ('{$tempUser}')"; $result = querySQL($sql); if (odbc_fetch_row($result) == false) { echo "Email or username does not exist."; } else { $sql = "UPDATE (solitaire) SET password='******' WHERE user='******'"; $result = querySQL($sql); }
$history = querySQL('reservation_history'); echo "<label>" . _visits . "</label><p>" . $visits . "</p>"; echo "<label>" . _last_visit . "</label><p>" . $lastvisit . "</p>"; echo "<label>" . _history . "</label>"; echo "<p><ul class='global'>"; if (count($history) > 0) { foreach ($history as $row) { if (trim($row->reservation_notes) != '') { echo "<li>" . $row->reservation_notes . "</li>"; } } } echo "</ul></p>"; //reservation history echo "<br/><label>" . _changes . "</label><p><div class='option_xl'><div class='text'></div>"; $res_history = querySQL('res_history'); echo "<select name='history' size='1' >\n"; foreach ($res_history as $row) { echo "<option>" . $row->author . " : " . $row->timestamp . "</option>"; } echo "</select></div></p><br/>"; ?> </div> </div> </div> <?php } ?> <br/> <br style='clear:both;'/> </div>
$row->subject."</a> | ".$row->outlet_name."</span> <p>".$row->description."</p><p><cite><span class='bold'> ".date($general['dateformat'],strtotime($row->event_date)). "</span> ".formatTime($row->start_time,$general['timeformat']). " - ".formatTime($row->end_time,$general['timeformat'])." | ". _ticket_price.": ".number_format($row->price,2). "</cite></p>"; if( key($row) != count($events_advertise)-1 ) { echo"<br/>"; } } echo "</div>"; } // Special event of the day and outlet $special_events = querySQL('event_data_day'); if ($special_events && $_SESSION['page'] == 2 ) { echo "<div class='alert_info'>"; // special events foreach($special_events as $row) { echo " <img src='../web/images/icon_cutlery.png' alt='special' class='middle'/> <span class='bold'> <a href='".$_SERVER['SCRIPT_NAME']."?outletID=".$row->outlet_id."&selectedDate=".$row->event_date."'>". _today.": ".$row->subject."</a></span> <p class='margin-bottom-10'>".$row->description."</p><p><cite> ".date($general['dateformat'],strtotime($row->event_date)). " ".formatTime($row->start_time,$general['timeformat']). " - ".formatTime($row->end_time,$general['timeformat'])." | ". _ticket_price.": ".number_format($row->price,2). "</cite></p>";
<?php /* Connection to Database */ // ** set configuration include '../../config/config.general.php'; // ** database functions include '../classes/database.class.php'; // ** connect to database include '../classes/connect.db.php'; // ** all database queries include '../classes/db_queries.db.php'; if ($_POST['cellid']) { // prevent dangerous input secureSuperGlobals(); $value = $_POST['action'] == 'enable' ? '1' : '0'; $id = (int) $_POST['cellid']; if (isset($id)) { $sql = querySQL('user_activate'); echo $sql; } else { echo "AJAX Error"; } }
// 2 = secondseating $_SESSION['wait'] = $_GET['w'] ? (int) $_GET['w'] : 0; // selected button if (isset($_GET['btn'])) { $_SESSION['button'] = (int) $_GET['btn']; } else { if (empty($_SESSION['button'])) { $_SESSION['button'] = 1; } } // reservation detail edit if (isset($_GET['resedit'])) { if ($_GET['resedit'] == 1) { $resedit = 'ON'; } } else { $resedit = 'OFF'; } // package code $_SESSION['pk_code'] = isset($_GET['pk']) ? $_GET['pk'] : 'CXL'; // searchquery $searchquery = ''; if (isset($_POST['searchquery'])) { $searchquery = $_POST['searchquery'] . "%"; $q = 4; } // Last ID of reservation table for ajax realtime updates $_SESSION['max_id'] = querySQL('max_id'); ?>
function getCurrentTVGuide($conn, $channels) { $sql = "\n\t\tSELECT * FROM (\n\t\t\tSELECT b.channel_hashid AS id, a.program_time AS program_time, a.title AS title \n\t\t\tFROM tbl_channel_program a, tbl_channel b\n\t\t\tWHERE b.channel_hashid in (" . toStringForSql($channels) . ")'\n\t\t\tAND\t\ta.channelid = b.channelid\n\t\t\tAND\t\tprogram_time <= NOW()\n\t\t\tORDER BY b.channel_hashid ASC , a.program_time DESC\n\t\t\tLIMIT 1\n\t\t) A\n\t\tUNION ALL\n\t\tSELECT * FROM (\n\t\t\tSELECT b.channel_hashid AS id, a.program_time AS program_time, a.title AS title \n\t\t\tFROM tbl_channel_program a, tbl_channel b\n\t\t\tWHERE b.channel_hashid in (" . toStringForSql($channels) . ")'\n\t\t\tAND\t\ta.channelid = b.channelid\n\t\t\tAND\t\tprogram_time > NOW()\n\t\t\tORDER BY b.channel_hashid ASC , a.program_time ASC\n\t\t\tLIMIT 5\n\t\t) B\n\t\t"; $result = querySQL($conn, $sql); return $result; }
/** * Executes additional installation processes * * @since 0.1 */ function com_install() { $result = true; //global $mainframe; $db =& JFactory::getDBO(); $installer =& JInstaller::getInstance(); $dbOrdner = $installer->getPath('extension_administrator') . DS . 'db' . DS; $filename = $dbOrdner . 'install.sql'; if (!file_exists($filename)) { JError::raiseWarning(1, 'SQL install file (' . $filename . ') does not exist.'); return false; } $file_content = file_get_contents($filename); $db->setQuery("SELECT value FROM #__fussball_infos WHERE name = 'db_version'"); $db_version = $db->loadResult(); if (isset($db_version)) { // Wenn schon eine Datenbank vorhanden ist, Versionen vergleichen $newVersion = getVersion($file_content); if ($db_version == $newVersion) { logge('Die vorhanden Datenbanktabellen der Version ' . $newVersion . ' werden verwendet.'); } else { $updateFilename = $dbOrdner . 'update' . $db_version . 'to' . $newVersion . '.sql'; if (file_exists($updateFilename)) { if (querySQL(file_get_contents($updateFilename))) { logge('Die Datenbank wurde auf die Version ' . $newVersion . ' geupdated.'); } else { logge('Beim Update der Datenbank von Version ' . $db_version . ' auf Version ' . $newVersion . ' trat ein Fehler auf.', false); $result = false; } } else { logge('Es ist kein Update-Skript (' . $updateFilename . ') für die Datenbank vorhanden.', false); $result = false; } } } else { // Wenn die Datenbank nicht vorhanden ist, diese anlegen if (querySQL($file_content)) { logge('Die Datenbanktabellen der Version ' . getVersion($file_content) . ' wurden installiert.'); } else { logge('Es trat ein Fehler beim Anlegen der Datenbanktabellen der Version ' . getVersion($file_content) . '.', false); $result = false; } } if ($result) { // $result = insertDefaultAttributes(); //if ($result) { logge('Fussball Komponente wurde erfolgreich installiert.'); //} } else { //logge(); //print_r(JError::getErrors()); } return $result; }
} echo "</tr></thead><tbody>"; $done = 1; } echo "<tr>"; echo "<td>" . $_SESSION['selOutlet']['outlet_name'] . "</td>"; $i = 0; while ($i <= 6) { // week day date $_SESSION['statistic_week'] = date('Y-m-d', mktime(0, 0, 0, $sm, $sd + $i, $sy)); // noon $value = $daylight_evening; $row = querySQL('statistic_week_def_noon'); $statistic_noon = $row[0]->paxsum ? $row[0]->paxsum : 0; // evening $row = querySQL('statistic_week_def_evening'); $statistic_evening = $row[0]->paxsum ? $row[0]->paxsum : 0; echo "<td><strong><a href='main_page.php?p=2&outletID=" . $_SESSION['selOutlet']['outlet_id'] . "&selectedDate=" . $_SESSION['statistic_week'] . "'>"; if ($statistic_noon == 0 && $statistic_evening == 0) { echo ""; } else { echo "<img src='images/icons/clock-sun.png' style='height:10px' class='middle'/>" . $statistic_noon; echo "<img src='images/icons/clock-moon.png' style='height:10px' class='middle'/>" . $statistic_evening . "</a><strong></td>"; } $i++; } echo "</tr>"; if ($done != 1) { echo "</tbody>"; } }
<?php session_start(); $_SESSION['language'] = $_SESSION['language'] ? $_SESSION['language'] : 'en'; // Check for a unique username // ** set configuration include '../../config/config.general.php'; // ** database functions include '../classes/database.class.php'; // ** connect to database include '../classes/connect.db.php'; // ** all database queries include '../classes/db_queries.db.php'; // ** localization functions include '../classes/local.class.php'; // ** set configuration include '../../config/config.inc.php'; // translate to selected language translateSite(substr($_SESSION['language'], 0, 2), '../'); // prevent dangerous input secureSuperGlobals(); if (isset($_POST['username'])) { $value = $_POST['username']; $sql_check = querySQL('check_username'); if (mysql_num_rows($sql_check)) { echo '<span style="color: red;">' . _already_user_1 . ' <span class="bold">' . $value . '</span> ' . _already_user_2 . '</span>'; } else { echo "OK"; } }
function getChannelOfService($conn, $serviceid) { $sql = "\n\t\t\tselect \n\t\t\t\tsubstr(a.groupname, 3) as groupname, a.grouptype, \n\t\t\t\ta.id, a.channel_hashid, substr(a.name, 4) as name, a.image, a.piecelength,\n\t\t\t\tsubstr(a.groupname, 1, 1) as gorder,\n\t\t\t\tsubstr(a.name, 1, 2) as corder\n\t\t\tfrom \n\t\t\t\ttbl_channel a, tbl_service_channel b\n\t\t\twhere \n\t\t\t\ta.delete_flag=0 and b.delete_flag=0 and b.serviceid='" . toStringForSql($serviceid) . "' and a.id=b.channelid and a.status=1 and a.grouptype = 1\n\t\t\tunion all\n\t\t\tselect \n\t\t\t\tsubstr(a.groupname, 3) as groupname, a.grouptype, \n\t\t\t\ta.id, a.channel_hashid, substr(a.name, 6) as name, a.image, a.piecelength,\n\t\t\t\tsubstr(a.groupname, 1, 1) as gorder,\n\t\t\t\tsubstr(a.name, 1, 4) as corder\n\t\t\tfrom \n\t\t\t\ttbl_channel a\n\t\t\twhere \n\t\t\t\ta.delete_flag=0 and a.status=1 and a.grouptype = 2\n\t\t\torder by \n\t\t\t\tgrouptype, gorder, corder\n\t\t"; $result = querySQL($conn, $sql); return $result; }
secureSuperGlobals(); $_SESSION['confHash'] = $_GET['c']; $errorMessage = ""; $validCount = 0; //check confirmation hash with the database $result = querySQL('check_confirm_code'); //print_r($result); //$validCount = mysql_num_rows($result); if ($result['active'] == 1) { $errorMessage .= _errorMessage_all; } if (!$result) { $errorMessage .= _errorMessage_no; } if (empty($errorMessage)) { $result = querySQL('user_confirm_activate'); $errorMessage .= _errorMessage_yes; } ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <!-- Website Title --> <title>Account Activation</title> <!-- Meta data for SEO --> <meta name="description" content="An easy to use Restaurant Reservation System"/> <meta name="keywords" content="Restaurant Reservation System, Restaurant, Hotel, Reservation"/>
</div> <!-- End content --> <br class="clear"/> <div id="footer"> <div class="detail"> <?php if (!$_SESSION['prp_name']) { $_SESSION['prp_name'] = querySQL('db_property'); } $filename = substr(dirname(__FILE__), 0, -9) . "xt-admin"; if ($this_page != "property") { echo "<img src='images/icon_user.png' alt='User:'******'middle'/><a href='"; if ($_SESSION['role'] == '1' && file_exists($filename)) { echo "../xt-admin/index.php"; } $name = $_SESSION['realname'] == '' ? $_SESSION['u_name'] : $_SESSION['realname']; echo "'><span class='bold'> " . $name . "</span></a>"; } ?> | © 2011 by mySeat <?php echo $sw_version; ?> distributed under the terms of the GNU General Public License </div> </div>
function processBooking() { // rather than recursively calling query, insert all rows with one query global $general; // database table to store reservations $table = 'reservations'; // reservation date $reservation_date = $_SESSION['selectedDate']; // prepare POST data for storage in database: // $keys // $values if ($_POST['action'] == 'submit') { $keys = array(); $values = array(); $i = 1; // prepare arrays for database query foreach ($_POST as $key => $value) { if ($key != "action" && $key != "dbdate" && $key != "reservation_date" && $key != "recurring_dbdate" && $key != "captcha" && $key != "barrier" && $key != "reservation_author" && $key != "email_type" && $key != "captchaField1" && $key != "captchaField2" && $key != "captchaField3") { $keys[$i] = $key; $values[$i] = "'" . $value . "'"; } // remember some values if ($key == "reservation_date") { $reservation_date = strtotime($value); } else { if ($key == 'reservation_booker_name') { $_SESSION['author'] = $value; } else { if ($key == 'reservation_time') { $_SESSION['reservation_time'] = "'" . $value . "'"; } else { if ($key == 'reservation_pax') { $_SESSION['reservation_pax'] = "'" . $value . "'"; } } } } if ($key == "reservation_date") { $keys[$i] = $key; $values[$i] = "'" . $_SESSION['selectedDate'] . "'"; } $i++; } // END foreach $_POST // =-=-=-=Store in database =-=-=-=-=-=-=-=-=-=-=-=-=-=-= // clear old booking number $_SESSION['booking_number'] = ''; // variables $res_pax = $_POST['reservation_pax'] ? (int) $_POST['reservation_pax'] : 0; // sanitize old booking numbers $clr = querySQL('sanitize_unique_id'); // create and store booking number if (!$_POST['reservation_id'] || $_POST['reservation_id'] == '') { $_SESSION['booking_number'] = uniqueBookingnumber(); //$_SESSION['messages'][] = _booknum.": ' ".$_SESSION['booking_number']." '"; $keys[] = 'reservation_bookingnumber'; $values[] = "'" . $_SESSION['booking_number'] . "'"; } // =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= // enter into database // =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= // build new reservation date $index = array_search('reservation_date', $keys); // build for availability calculation $index = array_search('reservation_wait', $keys); if ($index) { $values[$index] = '1'; $waitlist = '1'; } //Check Availability // =-=-=-=-=-=-=-=-= // get Pax by timeslot $resbyTime = reservationsByTime('pax'); $tblbyTime = reservationsByTime('tbl'); // get availability by timeslot $occupancy = getAvailability($resbyTime, $general['timeintervall']); $tbl_occupancy = getAvailability($tblbyTime, $general['timeintervall']); //cut both " ' " from reservation_pax $res_pax = substr($_SESSION['reservation_pax'], 0, -1); $res_pax = substr($_SESSION['reservation_pax'], 1); $startvalue = $_SESSION['reservation_time']; //cut both " ' " from reservation_time $startvalue = substr($startvalue, 0, -1); $startvalue = substr($startvalue, 1); $val_capacity = $_SESSION['outlet_max_capacity'] - $occupancy[$startvalue]; $tbl_capacity = $_SESSION['outlet_max_tables'] - $tbl_occupancy[$startvalue]; if ((int) $res_pax > $val_capacity || $tbl_capacity < 1) { //prevent double entry $index = array_search('reservation_wait', $keys); if ($index > 0) { $values[$index] = '1'; // = waitlist $waitlist = '1'; } else { // error on new entry $keys[] = 'reservation_wait'; $values[] = '1'; // = waitlist $waitlist = '1'; } } // END Availability if ($waitlist != 1) { // number of database fields $max_keys = count($keys); // enter into database // ----- $query = "INSERT INTO `{$table}` (" . implode(',', $keys) . ") VALUES (" . implode(',', $values) . ") ON DUPLICATE KEY UPDATE "; // Build 'on duplicate' query for ($i = 1; $i <= $max_keys; $i++) { if ($keys[$i] != '') { $query .= $keys[$i] . "=" . $values[$i] . ","; } else { $max_keys++; } } // run sql query $query = substr($query, 0, -1); $result = query($query); $_SESSION['result'] = $result; // Reservation ID $resID = mysql_insert_id(); // *** send confirmation email if ($_POST['email_type'] != 'no') { include '../web/classes/email.class.php'; } // store new reservation in history $result = query("INSERT INTO `res_history` (reservation_id,author) VALUES ('%d','%s')", $resID, $_SESSION['author']); // Reservation was done $waitlist = 2; } // reservation done, handle back waitlist status return $waitlist; } }
$channel["id"] = $row["channel_hashid"]; $channel["name"] = $row["name"]; $channel["image"] = "channel" . substr('00' . $row["image"], -2) . ".png"; $channel["curpid"] = number_format($curpid, 0, '', ''); $channel["piecelength"] = $row["piecelength"]; $channel["groupname"] = $row["groupname"]; $channel["grouptype"] = $row["grouptype"]; $channel["date"] = array(); $channel["programs"] = array(array("program" => array())); if ($channel["grouptype"] == 1 && substr($userflag, 0, 1) == "1") { // date $starttime = strtotime(date('Y-m-d 0:0:0', strtotime("-6 day"))); // floor(UNIX_TIMESTAMP(c.program_time) * 1000 / " . $channel["piecelength"] . ") as pid, // UNIX_TIMESTAMP(c.program_time) as program_time, $sql = "\n\t\t\t\t\tselect \n\t\t\t\t\t\tc.title, \n\t\t\t\t\t\tc.contents, \n\t\t\t\t\t\tc.program_time\n\t\t\t\t\tfrom \n\t\t\t\t\t\ttbl_channel_program c\n\t\t\t\t\twhere \n\t\t\t\t\t\tc.channelid ='" . toStringForSql($row["id"]) . "' and c.delete_flag=0 and c.program_time >= " . $starttime . "\n\t\t\t\t\torder by \n\t\t\t\t\t\tc.program_time\n\t\t\t\t"; $result_program = querySQL($conn, $sql); $row_program = mysql_fetch_array($result_program, MYSQL_ASSOC); for ($d = 0; $d < 7; $d++) { $date = array("name" => date('Y-m-d', $starttime), "programs" => array(array("program" => array()))); // time if ($d < 6) { $endtime = $starttime + 3600 * 23; } else { $endtime = floor($curtime / 3600) * 3600; } $date["start_pid"] = number_format($starttime / $row["piecelength"] * 1000, 0, '', ''); $date["start_time"] = intval(date('G', $starttime)); $date["end_pid"] = number_format($endtime / $row["piecelength"] * 1000, 0, '', ''); $date["end_time"] = intval(date('G', $endtime)); $date["step_pid"] = 3600 * 1000 / $row["piecelength"]; $date["step_time"] = 1;
<div class="popup"> <div class="top"></div> <div class="content"> <ul class="submenu"> <? $outlets = querySQL('db_outlets'); foreach($outlets as $row) { if ( ($row->saison_start<=$row->saison_end && $_SESSION['selectedDate_saison']>=$row->saison_start && $_SESSION['selectedDate_saison']<=$row->saison_end) ) { echo"<li>\n<a href='?p=2&outletID=".$row->outlet_id."'>".$row->outlet_name."</a>\n</li>\n"; } } ?> </ul> <br class="clear"/> </div> <div class="footer"></div> </div>
</th> <th scope="col"><?php echo _edit; ?> </th> </tr> </thead> <tfoot> </tfoot> <tbody class="plugins"> <?php foreach ($plugin_headers as $plugin_header) { $field = $plugin_header['filename']; $action = querySQL('get_plugins'); ?> <tr <?php if ($action == 1) { echo "class='row-active'"; } ?> > <td><a href="<?php echo $plugin_header['PluginURI']; ?> " title="<?php echo $plugin_header['Title']; ?>
$repeatid = 0; if (isset($_GET['repeatid'])) { $repeatid = $_GET['repeatid']; } elseif (isset($_POST['repeatid'])) { $repeatid = $_POST['repeatid']; } if (isset($_GET['button'])) { $button = $_GET['button']; } elseif (isset($_POST['button'])) { $button = $_POST['button']; } if ($action == "DEL") { if ($button == 'all') { // ****** DELETE MULTI ****** $cmd_delete = querySQL('del_res_multi'); $reservation_id = 0; return $cmd_delete; } else { if ($button == 'single') { // ****** DELETE SINGLE ****** $cmd_delete = querySQL('del_res_single'); return $cmd_delete; } } } else { if ($action == "ALW") { // ****** DELETE SINGLE ****** $cmd_allow = querySQL('alw_res_single'); return $cmd_allow; } }
<?php /* Connection to Database */ // ** set configuration include '../../config/config.general.php'; // ** database functions include '../classes/database.class.php'; // ** connect to database include '../classes/connect.db.php'; // ** all database queries include '../classes/db_queries.db.php'; if ($_POST['id']) { // prevent dangerous input secureSuperGlobals(); /* Get POST data */ $submitted_id = $_POST['id']; $value = $_POST['value']; $exid = explode("-", $submitted_id); $field = $exid[0]; $id = $exid[1]; /* Submit POST data */ $sql = querySQL('inline_edit'); /* Submit POST data */ echo $value; }
echo "\r\n"; } mysql_free_result($result); break; case 'get_user_meeting': $userid = getQueryData('userid'); $sql = "select a.meetingid, b.meetingname\r\n\t\t\t\t\tfrom tbl_user_meeting a, tbl_meeting b \r\n\t\t\t\t\twhere a.delete_flag=0 and b.delete_flag=0 and a.meetingid=b.id and a.userid='" . $userid . "'"; $result = querySQL($db, $sql); $data = array(); while ($row = mysql_fetch_assoc($result)) { $data[] = $row; } responseData(true, null, $data); break; case 'get_all_meeting': $userid = getQueryData('userid'); $sql = "select id as meetingid, meetingname from tbl_meeting where delete_flag=0 and\r\n\t\t\t\t\t\t\tid not in (select meetingid from tbl_user_meeting where delete_flag=0 and userid='" . $userid . "')"; $result = querySQL($db, $sql); $data = array(); while ($row = mysql_fetch_assoc($result)) { $data[] = $row; } responseData(true, null, $data); break; default: responseData(false, 'invalid function'); break; } } catch (Exception $e) { responseData(false, $e->getMessage()); }
<?php session_start(); /* Connection to Database */ // ** set configuration include '../../config/config.general.php'; // ** database functions include '../classes/database.class.php'; // ** connect to database include '../classes/connect.db.php'; // ** all database queries include '../classes/db_queries.db.php'; // prevent dangerous input secureSuperGlobals(); $value = $_POST['value']; $id = $_POST['id']; $sql = querySQL('update_maitre_dayoff'); echo $sql;
</div> </div> <div class="oh"> <input type="hidden" name="action" id="action" value="submit"/> <input type="hidden" name="barrier" value="<?php echo $barrier; ?> " /> <input type="hidden" name="reservation_referer" value="<?php echo $_SESSION['referer']; ?> " /> <input type="hidden" name="reservation_hotelguest_yn" id="reservation_hotelguest_yn" value="PASS"/> <input type="hidden" name="reservation_booker_name" id="reservation_booker_name" value="Contact Form"/> <input type="hidden" name="reservation_author" id="reservation_author" value="<?php echo querySQL('db_property'); ?> Team"/> <input type="hidden" name="email_type" id="email_type" value="<?php echo $language; ?> "/> <?php $day_off = getDayoff(); if ($day_off == 0) { echo "<div class='tc'><br/><br/><input class='button " . $default_color . " large' type='submit' value='" . $lang['contact_form_send'] . "' /></div>"; } else { echo "<div id='messageBox'><div class='alert_error'>\n\t\t\t\t\t<p><img src='../web/images/icon_error.png' alt='error' class='middle' /> " . _day_off . "</p></div></div>"; } ?>
</th> <th>IP</th> <th><?php echo _time; ?> </th> <th><?php echo _active; ?> </th> <th></th> </tr> </thead> <tbody> <?php $users = querySQL('db_prp_users'); if ($users) { foreach ($users as $row) { echo "<tr id='user-" . $row->userID . "'>"; echo "<td>" . $row->userID . "</td>\n\t\t\t<td><span class='bold'><a href='?p=6&q=2&btn=3&userID=" . $row->userID . "'>" . $row->username . "</a></strong></td>\n\t\t\t<td>" . $row->realname . "</td>\n\t\t\t<td>" . $row->email . "</td>\n\t\t\t<td>" . $roles[$row->role] . "</td>\n\t\t\t<td><small>" . $row->last_ip . "</small></td>\n\t\t\t<td><small>" . $row->last_login . "</small></td>\n\t\t\t<td>"; if ($row->active > 0) { $hidden1 = "style='display:block; float:left;'"; $hidden2 = "style='display:none; float:left;'"; } else { $hidden1 = "style='display:none; float:left;'"; $hidden2 = "style='display:block; float:left;'"; } echo "<a href='#this' id='disable-" . $row->userID . "' class='modalactivate' " . $hidden1 . ">\n\t\t\t\t<img src='../web/images/icons/ui-check-box.png' alt='Disable' title='Disable' /></a>"; echo "<a href='#this' id='enable-" . $row->userID . "' class='modalactivate' " . $hidden2 . ">\n\t\t\t\t<img src='../web/images/icons/ui-check-box-uncheck.png' alt='Enable' title='Enable' /></a>"; echo "</td>\n\t\t \t\t\n\t\t \t\t<td>\n\t\t\t\t <a href='#modaldelete' name='users' id='" . $row->userID . "' class='deletebtn'>\n\t\t\t\t\t<img src='images/icons/delete_cross.png' alt='" . _cancelled . "' class='help' title='" . _delete . "'/>\n\t\t\t\t\t</a>\n\t\t \t</td>\n\t\t\t</tr>"; }
?> </th> <th style="width:5%"><?php echo _fax; ?> </th> <th style="width:5%"><?php echo _delete; ?> </th> </tr> </thead> <tbody> <? $properties = querySQL('all_properties'); if ($properties ) { foreach($properties as $row) { echo "<tr id='property-".$row->id."'>"; echo"<td><span class='bold'><a href='?p=5&propertyID=".$row->id."'>".$row->name."</a></strong></td> <td>".$row->street."</td> <td>".$row->city."</td> <td>".$row->contactperson."</td> <td>".$row->email."</td> <td>".$row->phone."</td> <td>".$row->fax."</td> <td> <a href='#modaldelete' name='properties' id='".$row->id."' class='deletebtn'> <img src='images/icons/delete_cross.png' alt='"._cancelled."' class='help' title='"._delete."'/>
<? // Initiate dates $pdate = date($general['dateformat'],strtotime($_SESSION['selectedDate'])); $sdate = ""; // Get property name $prop_name = querySQL('db_property'); if ( $_POST['recurring_dbdate']!="" && $_POST['recurring_dbdate']>$_SESSION['selectedDate'] ) { $sdate = date($general['dateformat'],strtotime($_POST['recurring_dbdate'])); } // To send HTML mail, the Content-type header must be set // charset=charset=iso-8859-1 $headers = 'MIME-Version: 1.0' . "\r\n"; $headers .= 'Content-type: text/html; charset=UTF-8' . "\r\n"; // Additional headers $headers .= 'From: '.$prop_name.' <'.$_SESSION['selOutlet']['confirmation_email'].'>' . "\r\n"; $headers .= 'Bcc: '.$_SESSION['selOutlet']['confirmation_email']. "\r\n"; // Subject of email if ( $_POST['email_type'] == 'en' ) { $subject = _email_subject_en." ".$prop_name; }else{ $subject = _email_subject." ".$prop_name; } //Salutation if ( $_POST['email_type'] == 'en' ) { switch ($_POST['reservation_title']) {
<?php // To send HTML mail, the Content-type header must be set $headers = 'MIME-Version: 1.0' . "\r\n"; $headers .= 'Content-type: text/html; charset=UTF-8' . "\r\n"; // Additional headers $headers .= 'From: mySeat Team <*****@*****.**>' . "\r\n"; //$headers .= 'Bcc: support@myseat.us \r\n'; //get a random 8 character string $_SESSION['confHash'] = randomString(); //confirmation hash to database $rows = querySQL('user_confirm_code'); // Get property details $property = querySQL('property_info'); // Subject of email $subject = "Welcome to mySeat"; // prepate logo file $logo = $property['logo_filename'] == '' ? 'logo.png' : $property['logo_filename']; $logo = $global_basedir . 'uploads/logo/' . $logo; // prepate welcome text of email //$text = _user_email_confirmation; // prepate confirmation text of email $text = _user_activation_email; $message = sprintf($text, $_POST['username'], $global_basedir, $_SESSION['confHash'], $global_basedir, $_SESSION['confHash']); // =============== // Email template // =============== $html_text = ' <html> <head>
function getDayoff() { $day_off = 0; $today = date('w', strtotime($_SESSION['selectedDate'])); //read infos from database $rows = querySQL('outlet_info'); foreach ($rows as $row) { $outlet_dayoff = explode(",", $row->outlet_closeday); } $rows = querySQL('maitre_info'); foreach ($rows as $row) { $maitre_dayoff = $row->outlet_child_dayoff; } // define dayoff or y/n if ($outlet_dayoff) { foreach ($outlet_dayoff as $closeday) { if ($closeday == $today) { $day_off = 1; } } } if ($maitre_dayoff == 'ON') { $day_off = 1; } else { if ($maitre_dayoff == 'OFF') { $day_off = 0; } } return $day_off; }