示例#1
0
require_once '../common/config/config.inc.php';
require_once SOURCE_ROOT . 'common/config/array.inc.php';
require_once SOURCE_ROOT . 'classes/class.urns.php';
require_once SOURCE_ROOT . 'classes/class.clients_login.php';
require_once SOURCE_ROOT . 'classes/class.niches.php';
$objClientLogin = new ClientsLogin();
$objClientLogin->isValidClients();
$objUrns = new Urns();
$objNiches = new Niches();
$objSessionRedirectUrl = new SessionRedirectUrl();
$arrUrnsFlds = array();
$arrUrnsRecds = array('pkNicheID', 'NicheTitle', 'NicheFirstName', 'NicheLastName');
if (isset($_GET['n_id'])) {
    $varWhere = ' pkUrnID = \'' . $_GET['n_id'] . '\'';
    $arrUrnsRecord = $objUrns->getUrnsListing(TABLE_URNS, $arrUrnsFlds, '', $varWhere);
    $table = "niches JOIN urns ON niches.pkNicheID=urns.fkNicheID";
    $arrUrnsList = $objUrns->getUrnsListing($table, $arrUrnsRecds, '', $varWhere);
    $clientID = $_SESSION['sessClientID'];
    //print_r($arrUrnsList[0]);die;
    $arrNichesFlds = array('Section', 'row', 'columns');
    $varWhere = ' fkNicheID = \'' . $arrUrnsList[0]['pkNicheID'] . '\'';
    $arrNichesRecord = $objNiches->getNichesLocationListing(TABLE_NICHE_LOCATIONS, $arrNichesFlds, '', $varWhere);
    //var_dump($_SESSION['sessClientLoginID']);die;
    //var_dump($arrNichesRecord[0]["Section"]);die;
}
//var_dump($arrUrnsList[0]['NicheTitle']);die;
@extract($arrUrnsRecord[0]);
?>
<!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">
示例#2
0
<label ><strong>Tag Number<font color="#FF0000">*</font></strong>: </label>
<input type="text" name="UrnTagNumber" id="UrnTagNumber"  value="<?php 
echo $UrnTagNumber;
?>
"/>
<br />

<label ><strong>Niches<font color="#FF0000">*</font></strong>: </label>
<select name="fkNicheID" id="fkNicheID">
<option value="">---Last Name, Section, Row, Column---</option>
<?php 
foreach ($arrNichesRecord as $arrNiches) {
    $arrUrnsFlds = array('count(pkUrnID) as nichesCnt');
    $varUrnsWhere = ' 1 AND fkNicheID = ' . $arrNiches['pkNicheID'];
    $arrUrnsList = $objUrns->getUrnsListing(TABLE_URNS, $arrUrnsFlds, '', $varUrnsWhere);
    $CntUrnsList = $arrUrnsList[0]['nichesCnt'];
    if ($arrNiches['NicheStatus'] != 'inactive' && $CntUrnsList < 2) {
        ?>
<option value="<?php 
        echo $arrNiches['pkNicheID'];
        ?>
"<?php 
        if ($fkNicheID == $arrNiches['pkNicheID']) {
            ?>
 selected="selected" <?php 
        }
        ?>
><?php 
        echo $arrNiches['NicheLastName'] . ', ' . $arrNiches['Section'] . ', ' . $arrNiches['row'] . ', ' . $arrNiches['columns'];
        ?>