function listcatout($regid) { $res = SelectFromDBArray("SELECT * from categories"); foreach ($res as $value) { if ($regid == $value['id']) { ?> <option selected value="<?php echo $value['id']; ?> "><?php echo $value['first']; ?> </option> <?php } else { ?> <option value="<?php echo $value['id']; ?> "><?php echo $value['first']; ?> </option> <?php } } }
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <?php require_once LIBPATH . "db.php"; if (isset($_SESSION['userid'])) { $userid = $_SESSION['userid']; $userid = mysql_escape_string($userid); $arr = SelectFromDBArray("SELECT * from ads where userid={$userid}"); if ($arr == FALSE) { echo "<script>document.location.replace('/main');</script>"; } }
<?php } ?> </select> <div class="chosen-container chosen-container-multi" style="width: 100%;" title=""><!-- <ul class="chosen-choices"><li class="search-field"><input type="text" value="Choose Categories" class="default" autocomplete="off" style="width: 149px;"></li></ul> --><div class="chosen-drop"><ul class="chosen-results"></ul></div></div> </div> <div class="widget" style="margin-top:-20px"> <h4>Местоположение заказов</h4> <select data-placeholder="Выберите регион" multiple name="region" class="chosen-select-no-single" style="display: none;"> <?php $arr = SelectFromDBArray("SELECT * from regions"); foreach ($arr as $value) { ?> <option value="<?php echo $value['id']; ?> "><?php echo $value['region']; ?> </option> <?php } ?> </select>
$title = 'Объявления'; } if (isset($adsId)) { $title = $adsId['name']; } if (auth_getRole(auth_getUserId()) == 'admin') { $access = TRUE; } if (!isset($NoShowHeaderAndFooter)) { } ?> <link href="css/style.css" rel="stylesheet"> <?php if (isset($ads)) { $catarr = SelectFromDBArray("SELECT * from categ"); include TMPALATEPATH . 'searchform.php'; ?> <h2>Объявления</h2> <div id="ads-box"> <div id="ads-list"> <?php foreach ($ads as $nw) { ?> <div class="page-container"> <?php //print_r(strtotime($nw['time_end'])); ?> <div <?php if (strtotime($nw['time_end']) >= time()) { ?>
<?php include_once LIBPATH . 'db.php'; include_once LIBPATH . 'mainfun.php'; $catarr = SelectFromDBArray("SELECT first,sec,third from categories"); include_once TMPALATEPATH . 'main.php';
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script> <![endif]--> </head> <body> <div id="wrapper"> <!-- Header ================================================== --> <?php include "blocks/header-cl.php"; //require("lib/db.php"); if (isset($_REQUEST['adid'])) { $adid = $_REQUEST['adid']; //$arr=SelectFromDBArray("SELECT * from applications where adid=$adid"); $usarr = SelectFromDBArray("SELECT * from users INNER JOIN applications ON users.id=applications.clid"); $one = SelectFirstFromDB("SELECT title from ads where id={$adid}"); //$arr=array_merge($arr, $usarr); //print_r($arr); } ?> <div class="clearfix"></div> <div id="titlebar" class="single"> <div class="container"> <div class="sixteen columns"> <h2> <i class="fa fa-user-plus"> </i> Заявки к заказу "<?php if (isset($one['title'])) { echo $one['title']; } ?>