コード例 #1
0
ファイル: menu.php プロジェクト: araranga/svest
<header>
<?php 
$main = getrow("tbl_logo");
$menu = mysql_query("SELECT * FROM tbl_userweb WHERE userweb_id='" . $_GET['id'] . "'");
$row = mysql_fetch_array($menu);
?>
  <div class="container_12">
    <div class="grid_12">
      <div class="wrapper"><a href="/" class='logo'><?php 
echo $main['title'];
?>
</a>
        <nav>
    <ul class="menu">
<li><a href="/userpage/?id=<?php 
echo $_GET['id'];
?>
&com=1"><?php 
echo $row['t1'];
?>
</a></li>
<li><a href="/userpage/?id=<?php 
echo $_GET['id'];
?>
&com=2"><?php 
echo $row['t2'];
?>
</a></li>
<li><a href="/userpage/?id=<?php 
echo $_GET['id'];
?>
コード例 #2
0
ファイル: index.php プロジェクト: bogiesoft/TravelAgentv2
function searchnormal()
{
    global $db, $lang, $prefix;
    include "header.php";
    $pagla = new Template();
    $origin = addslashes($_REQUEST["origin"]);
    $destination = addslashes($_REQUEST["destination"]);
    if (empty($origin) && empty($destination)) {
        header("location:index.php?m=search");
    }
    //query
    $qorigin = $db->query("SELECT origin_name  FROM " . $prefix . "_origin WHERE origin_name LIKE '%{$origin}%'");
    list($originName) = $db->fetch_row($qorigin);
    $qd = $db->query("SELECT destination_name FROM " . $prefix . "_destination WHERE destination_name LIKE '%{$destination}%'");
    list($destinationName) = $db->fetch_row($qd);
    $query = "SELECT * FROM " . $prefix . "_fares," . $prefix . "_fares_origin," . $prefix . "_origin," . $prefix . "_destination\r\n\t WHERE fare_active=1\r\n\tAND fare_id= fares_fare AND fares_origin =origin_id\r\n\tAND fare_destination=destination_id";
    if (!empty($origin)) {
        $query .= " AND origin_name LIKE'%{$origin}%'";
    }
    if (!empty($destination)) {
        $query .= " AND destination_name LIKE '%{$destination}%'";
    }
    $qsearch = $db->query($query);
    $num_record = $db->row_count($qsearch);
    if ($num_record < 1) {
        $pagla->assign("norecord", "norecord");
        $pagla->assign("lang", $lang);
        $pagla->display("search/search_result.tpl");
        include "footer.php";
        exit;
    }
    if (isset($_GET['page'])) {
        $page = intval($_GET['page']);
    } else {
        $page = 1;
    }
    $currentpage = $page;
    $perpage = 15;
    $start = ($page - 1) * $perpage;
    $pages = ceil($num_record / $perpage);
    $starting_no = $start + 1;
    if ($num_record - $start < $perpage) {
        $end_count = $num_record;
    } elseif ($num_record - $start >= $perpage) {
        $end_count = $start + $perpage;
    }
    if ($pages > 1) {
        $page_link = makepagelink("index.php?m=search&op=searchnormal&origin={$origin}&destination={$destination}", $page, $pages);
    } else {
        $page_link = "";
    }
    $result = $db->query("{$query}  ORDER BY   fare_adultfare ASC limit {$start},{$perpage}");
    while ($row = $db->fetch_array($result)) {
        $indexx = $row[fare_id];
        $info[$indexx] = $row;
        $info[$indexx]["airline"] = getrow("airline_name", "travel_airline", "airline_id", "{$row['fare_airline']}");
    }
    #$originName=getrow("origin_name","".$prefix."_origin","origin_id","$origin");
    #$destinationName=getrow("destination_name","".$prefix."_destination","destination_id","$destination");
    $pagla->assign("lang", $lang);
    $pagla->assign("fareinfo", $info);
    $pagla->assign("found", $num_record);
    $pagla->assign("destinationName", $destination);
    $pagla->assign("originName", $origin);
    $pagla->assign("page_link", $page_link);
    $pagla->assign("end_count", $end_count);
    $pagla->assign("starting_no", $starting_no);
    $pagla->assign("currentpage", "{$currentpage}/{$pages}");
    $pagla->display("search/search_result.tpl");
    include "footer.php";
}
コード例 #3
0
ファイル: about.php プロジェクト: JonLoesch/security
<?
    require_once '../lib/util.php';
    $uid = $_GET['uid'];
    sql("SELECT username, profile FROM users WHERE uid={$uid}");
?>
<html>
    <head><title>Viewing user: <?php 
echo $user['username'];
?>
</title></head>
    <body>
        <? while ($row = getrow()) { ?>
            <table border=2>
                <? foreach ($row as $columnName => $value) { ?>
                    <tr><td> <?php 
echo $columnName;
?>
 </td> <td> <?php 
echo $value;
?>
 </td></tr>
                <? } ?>
            </table>
        <? } ?>
    </body>
</html>
コード例 #4
0
                                } else {
                                    $sqlu = '';
                                }
                                if (!query($sql . $sqlu, false)) {
                                    $errors[] = $sql . $sqlu . '<br />' . db_error();
                                }
                            }
                        } else {
                            $missing_table[] = $table;
                        }
                        $counter++;
                        if ($counter >= RESPOND_COUNTER) {
                            echo ' ';
                            $counter = 0;
                        }
                        $string = getrow($handle);
                    }
                }
                fclose($handle);
            }
        }
        if (!empty($missing_table) || !empty($missing_element)) {
            $messages = '
		<div class="warningbox">
			<h2>' . gettext("Restore encountered exceptions") . '</h2>';
            if (!empty($missing_table)) {
                $messages .= '
				<p>' . gettext('The following tables were not restored because the table no longer exists:') . '
					<ul>
					';
                foreach (array_unique($missing_table) as $item) {
コード例 #5
0
function stdhead($title = "", $msgalert = true)
{
    global $CURUSER, $BASEURL, $onoff, $reason, $class_name, $class, $SITE_ONLINE, $FUNDS, $SITENAME, $php_file, $smilies, $privatesmilies, $customsmilies, $mood, $pic_base_url, $BASEURL, $CACHE, $mood, $free_for_all, $freetitle, $freemessage, $double_for_all, $doubletitle, $doublemessage, $page_find, $lang_off, $language, $config, $cat_ico_uri;
    // ////site on/off
    if ($onoff != 1) {
        $my_siteoff = 1;
        $my_siteopenfor = $class_name;
    }
    if ($onoff != 1 && !$CURUSER) {
        die("<title>Site Offline!</title>\n<table width='100%' height='100%' bgcolor='orange' style='border: 8px inset #000000'><tr><td align='center'>\n<h1 style='color: #000000;'>" . safeChar($reason) . "</h1>\n<h1 style='color: #000000;'>\nPlease, try later...</h1>\n<img border=0 class=embedded width='800' height='300' src=pic/404.jpg>\n<br><center><form method='post' action='takesiteofflogin.php'>\n<table border='1' cellspacing='1' id='table1' cellpadding='3' style='border-collapse: collapse'>\n<tr><td colspan='2' align='center' bgcolor='orange'>\n<font color='black'><u><b>Staff Access Only </b></u></font></td></tr>\n<tr><td><font color='black'><b>Name:</b></font></td>\n<td><input type='text' size=20 name='username'></td></tr><tr>\n<td><font color='black'><b>Password:</b></font></td>\n<td><input type='password' size=20 name='password'></td>\n</tr><tr>\n<td colspan='2' align='center'>\n<input type='submit' value='Submit!'></td>\n</tr></table>\n</form></center>\n</td></tr></table>");
    }
    if ($onoff != 1 and $CURUSER["class"] < $class && $CURUSER["id"] != 1) {
        die("<title>Site Offline!</title>\n<table width='100%' height='100%' bgcolor='orange' style='border: 8px inset #000000'><tr><td align='center'>\n<h1 style='color: #000000;'>" . safeChar($reason) . "</h1>\n<h1 style='color: #000000;'>\nPlease, try later...</h1>\n<img border=0 class=embedded width='800' height='300' src=pic/404.jpg>\n</td></tr></table>");
    }
    // ///////////end on/off
    global $ss_uri, $CURUSER, $BASEURL, $SITE_ONLINE, $FUNDS, $SITENAME, $config, $php_file, $CACHE, $page_find, $lang_off, $language, $cat_ico_uri;
    /** languages by pdq **/
    $langs = array('Arabic', 'Danish', 'Nederlands', 'French', 'German', 'Greek', 'Hebrew', 'Hungarian', 'Latvian', 'Portuguese', 'Romanian', 'Swedish', 'Finnish', 'Italian', 'Spanish', 'English');
    if (isset($_GET['lang']) && in_array($_GET['lang'], $langs)) {
        switch ($_GET['lang']) {
            case 'Arabic':
                $this_lang = 'Arabic';
                break;
            case 'Danish':
                $this_lang = 'Danish';
                break;
            case 'Nederlands':
                $this_lang = 'Nederlands';
                break;
            case 'French':
                $this_lang = 'French';
                break;
            case 'German':
                $this_lang = 'German';
                break;
            case 'Greek':
                $this_lang = 'Greek';
                break;
            case 'Hebrew':
                $this_lang = 'Hebrew';
                break;
            case 'Hungarian':
                $this_lang = 'Hungarian';
                break;
            case 'Latvian':
                $this_lang = 'Latvian';
                break;
            case 'Portuguese':
                $this_lang = 'Portuguese';
                break;
            case 'Romanian':
                $this_lang = 'Romanian';
                break;
            case 'Swedish':
                $this_lang = 'Swedish';
                break;
            case 'Finnish':
                $this_lang = 'Finnish';
                break;
            case 'Italian':
                $this_lang = 'Italian';
                break;
            case 'Spanish':
                $this_lang = 'Spanish';
                break;
            case 'English':
                $this_lang = 'English';
                break;
        }
        setcookie("language", $this_lang, time() + 3600 * 24 * 1000, "/");
        $is_id = isset($_GET['id']) ? '?id=' . $_GET['id'] : '?lang=updated';
        header("Location: " . $is_id);
    }
    if (isset($_COOKIE['language']) && !in_array($_COOKIE['language'], $langs)) {
        setcookie('language', '', 0, '/');
    }
    $php_file = isset($page_find) ? '/' . $page_find . '/' : '';
    $lang = !isset($_COOKIE['language']) ? 'English' : $_COOKIE['language'];
    if (!isset($lang_off)) {
        require_once ROOT_PATH . 'languages/' . $page_find . '/' . $lang . '.php';
    } else {
        $language = '';
    }
    /** end of languages mod **/
    if (!$SITE_ONLINE) {
        die($language['server_down']);
    }
    header("Content-Type: text/html; charset=" . $language['charset']);
    header("Pragma: No-cache");
    //header("Expires: 300");
    header("Cache-Control: private");
    if ($title == "") {
        $title = $SITENAME . (isset($_GET['tbv']) ? " (" . TBVERSION . ")" : '');
    } else {
        $title = $SITENAME . (isset($_GET['tbv']) ? " (" . TBVERSION . ")" : '') . " :: " . safeChar($title);
    }
    include_once "cache/stylesheets.php";
    if ($CURUSER) {
        $stylesheet = getrow('id', "{$CURUSER['stylesheet']}", $stylesheets);
        $ss_a = $stylesheet['uri'];
        if ($ss_a) {
            $ss_uri = $ss_a;
        }
    }
    if (!$ss_uri) {
        $stylesheet = getrow('id', '1', $stylesheets);
        //$ss_uri = $stylesheet['uri'];
        $ss_uri = "NB-Revolt";
    }
    $GLOBALS["curentstyle"] = $ss_uri;
    /////////// cached by Bigjoos - Categorie Icon Set`s by ShadoW69
    include_once "cache/categorie_icons.php";
    if ($CURUSER) {
        $categorie_icon = getrow('id', "{$CURUSER['categorie_icon']}", $categorie_icons);
        $ss_ci = $categorie_icon['uri'];
        if ($ss_ci) {
            $cat_ico_uri = $ss_ci;
        }
    }
    if (!$cat_ico_uri) {
        $categorie_icon = getrow('id', '1', $categorie_icons);
        $cat_ico_uri = $categorie_icon['uri'];
    }
    $GLOBALS["currenticon"] = $cat_ico_uri;
    //cached by Bigjoos - Categorie Icon Set`s by ShadoW69
    require_once "themes/" . $ss_uri . "/template.php";
    require_once "themes/" . $ss_uri . "/stdhead.php";
}
コード例 #6
0
ファイル: forum.php プロジェクト: araranga/svest
  
    <div class="clear"></div>
  </div>
</section>
<!--==============================footer=================================-->
<footer>
							<?php 
echo $main['footer'];
?>
							<div class="social-footer">
								<?php 
include "includes/footeradded.php";
?>
								<ul>
                                    <?php 
$social = getrow("tbl_socialmanager");
?>
									<li><a href="<?php 
echo $social['facebook'];
?>
" class="fa fa-facebook"></a></li>
									<li><a href="<?php 
echo $social['twitter'];
?>
" class="fa fa-twitter"></a></li>
									<li><a href="<?php 
echo $social['youtube'];
?>
" class="fa fa-youtube"></a></li>
                                    <li><a href="<?php 
echo $social['google'];
コード例 #7
0
ファイル: login.php プロジェクト: JonLoesch/security
<?
    require_once '../lib/util.php';
    if (isset($_POST['newuser'])) {
        sql("SELECT uid FROM users WHERE username='******'username']}';");
        if (getrow()) {
            $message = 'Username already taken';
        } else {
            sql("INSERT INTO users (username, password) VALUES ('{$_POST['username']}', '{$_POST['password']}');");
            session_start();
            $_SESSION['uid'] = getid();
            redirect($_POST['redirect']);
            die("You are now logged in (for some reason the redirect didn't work)");
        }
    } else {
        sql("SELECT uid FROM users WHERE username='******'username']}' AND password='******'password']}';");
        if ($row = getrow()) {
            session_start();
            $_SESSION['uid'] = $row['uid'];
            redirect($_POST['redirect']);
            die("You are now logged in (for some reason the redirect didn't work)");
        }
    }
?>
<html>
    <head><title>Login</title></head>
    <body>
        <h1> DISCLAIMER: <font color=red>Do not use your real password</font></h1>
        <hr>
        Log in:
        <form method='POST'>
            <? hiddenInputs($_GET) ?>