function owpGetAllGetParameters($exclude_array = '') { global $_GET; if ($exclude_array == '') { $exclude_array = array(); } $get_url = ''; reset($_GET); while (list($key, $value) = each($_GET)) { if ($key != owpSessionName() && $key != 'error' && !owpInArray($key, $exclude_array)) { $get_url .= $key . '=' . $value . '&'; } } return $get_url; }
function debug() { for ($i = 0; $i < sizeof($this->path); $i++) { echo $this->path[$i]['page'] . '?'; while (list($key, $value) = each($this->path[$i]['get'])) { echo $key . '=' . $value . '&'; } if (sizeof($this->path[$i]['post']) > 0) { echo '<br>'; while (list($key, $value) = each($this->path[$i]['post'])) { echo ' <b>' . $key . '=' . $value . '</b><br>'; } } echo '<br>'; } if (sizeof($this->snapshot) > 0) { echo '<br><br>'; echo $this->snapshot['mode'] . ' ' . $this->snapshot['page'] . '?' . owpArraytoString($this->snapshot['get'], array(owpSessionName())) . '<br>'; } }
$owpDBTable['languages'] = $prefix_table . 'languages'; $owpDBTable['newsletters'] = $prefix_table . 'newsletters'; $owpDBTable['session'] = $prefix_table . 'sessions'; $owpDBTable['whos_online'] = $prefix_table . 'whos_online'; $owpDBTable['zones'] = $prefix_table . 'zones'; //session require_once OWP_CLASSES_DIR . 'owp_navigation_history.php'; require_once OWP_FUNCTIONS_DIR . 'owp_session.php'; if (isset($_COOKIE[owpSessionName()])) { owpSessionID($_COOKIE[owpSessionName()]); } else { if ($_POST[owpSessionName()]) { owpSessionID($_POST[owpSessionName()]); } else { if ($_GET[owpSessionName()]) { owpSessionID($_GET[owpSessionName()]); } } } owpSessIni(); if (!isset($_SESSION)) { $_SESSION = array(); session_destroy(); } // include the database functions include_once OWP_FUNCTIONS_DIR . 'owp_api.php'; include_once OWP_ADODB_DIR . 'toexport.inc.php'; include_once OWP_ADODB_DIR . 'adodb-errorhandler.inc.php'; include_once OWP_ADODB_DIR . 'adodb.inc.php'; include_once OWP_ADODB_DIR . 'tohtml.inc.php'; // make a connection to the database... now
?> </td> <td class="dataTableContent" align="center"><?php echo $whos_online['ip_address']; ?> </td> <td class="dataTableContent"><?php echo date('H:i:s', $whos_online['time_entry']); ?> </td> <td class="dataTableContent" align="center"><?php echo date('H:i:s', $whos_online['time_last_click']); ?> </td> <td class="dataTableContent"><?php if (eregi('^(.*)' . owpSessionName() . '=[a-f,0-9]+[&]*(.*)', $whos_online['last_page_url'], $array)) { echo $array[1] . $array[2]; } else { echo $whos_online['last_page_url']; } ?> </td> </tr> <?php $whos_online_query->MoveNext(); } ?> <tr> <td class="smallText" colspan="7"><?php echo sprintf(TEXT_NUMBER_OF_CUSTOMERS, $whos_online_query->RecordCount()); ?>
$check_admin_query = $db->Execute($sql); if ($check_admin_query->RecordCount()) { $check_admin = $check_admin_query->fields; if (!owpValidatePasword($password, $check_admin['admin_password'])) { $messageStack->add(ERROR_LOGIN_ERROR, 'error'); } else { if ($check_admin['admin_login'] == '1') { $_SESSION['user_id'] = $check_admin['admin_id']; $_SESSION['gender'] = $check_admin['admin_gender']; $_SESSION['firstname'] = $check_admin['admin_firstname']; $_SESSION['lastname'] = $check_admin['admin_lastname']; $_SESSION['allowed_pages'] = $check_admin['admin_allowed_pages']; $today = date("Y-m-d H:i:s"); $db->Execute("UPDATE " . $owpDBTable['administrators_info'] . " \n\t SET admin_info_date_of_last_logon = " . $db->DBTimeStamp($today) . ",\n\t admin_info_number_of_logons = admin_info_number_of_logons+1 \n WHERE admin_info_id = '" . owpDBInput($check_admin['admin_id']) . "'"); if (sizeof($navigation->snapshot) > 0) { $origin_href = owpLink($navigation->snapshot['page'], owpArraytoString($_SESSION['navigation']->snapshot['get'], array(owpSessionName())), $_SESSION['navigation']->snapshot['mode']); $navigation->clear_snapshot(); owpRedirect($origin_href); } else { owpRedirect(owpLink($owpFilename['index'], '', 'NONSSL')); } } else { $messageStack->add(ERROR_NO_USER_LOGIN, 'error'); } } } else { $messageStack->add(ERROR_LOGIN_NO_USER, 'error'); } } ?> <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
function display_links($query_numrows, $max_rows_per_page, $max_page_links, $current_page_number, $parameters = '', $page_name = 'page') { global $_SERVER; if ($parameters != '') { $parameters .= '&'; } // calculate number of pages needing links $num_pages = intval($query_numrows / $max_rows_per_page); // $num_pages now contains int of pages needed unless there is a remainder from division if ($query_numrows % $max_rows_per_page) { $num_pages++; } // has remainder so add one page $pages_array = array(); for ($i = 1; $i <= $num_pages; $i++) { $pages_array[] = array('id' => $i, 'text' => $i); } if ($num_pages > 1) { $display_links = owpDrawForm('pages', basename($_SERVER['PHP_SELF']), '', 'get'); if ($current_page_number > 1) { $display_links .= '<a href="' . owpLink(basename($_SERVER['PHP_SELF']), $parameters . $page_name . '=' . ($current_page_number - 1), 'NONSSL') . '" class="splitPageLink">' . PREVNEXT_BUTTON_PREV . '</a> '; } else { $display_links .= PREVNEXT_BUTTON_PREV . ' '; } $display_links .= sprintf(TEXT_RESULT_PAGE, owpPullDownMenu($page_name, $pages_array, '', 'onChange="this.form.submit();"'), $num_pages); if ($current_page_number < $num_pages && $num_pages != 1) { $display_links .= ' <a href="' . owpLink(basename($_SERVER['PHP_SELF']), $parameters . $page_name . '=' . ($current_page_number + 1), 'NONSSL') . '" class="splitPageLink">' . PREVNEXT_BUTTON_NEXT . '</a>'; } else { $display_links .= ' ' . PREVNEXT_BUTTON_NEXT; } if ($parameters != '') { if (substr($parameters, -1) == '&') { $parameters = substr($parameters, 0, -1); } $pairs = explode('&', $parameters); while (list(, $pair) = each($pairs)) { list($key, $value) = explode('=', $pair); $display_links .= owpDrawHiddenField(rawurldecode($key), rawurldecode($value)); } } if (SID) { $display_links .= owpDrawHiddenField(owpSessionName(), owpSessionID()); } $display_links .= '</form>'; } else { $display_links = sprintf(TEXT_RESULT_PAGE, $num_pages, $num_pages); } return $display_links; }