本文整理汇总了PHP中generateSelect函数的典型用法代码示例。如果您正苦于以下问题:PHP generateSelect函数的具体用法?PHP generateSelect怎么用?PHP generateSelect使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了generateSelect函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: createDataSelectorFromTable
function createDataSelectorFromTable($table, $columns, $where = null, $groupBy = null, $orderBy = null, $dbKey = "app")
{
$sqlObj = _db($dbKey)->_selectQ($table, $columns)->_where(array("blocked" => "false"));
if ($where != null) {
$sqlObj = $sqlObj->_where($where);
}
// if(isset($_SESSION['SESS_PRIVILEGE_ID'])) {
// $sqlObj=$sqlObj->_where(array("privilege"=>"*"))
// ->where("(privilege='*' OR FIND_IN_SET('{$_SESSION['SESS_PRIVILEGE_NAME']}',privilege))");
// } else {
// $sqlObj=$sqlObj->_where(array("privilege"=>"*"));
// }
if (strlen($groupBy) > 0) {
$sqlObj = $sqlObj->_groupby($groupBy);
}
if (strlen($orderBy) > 0) {
$sqlObj = $sqlObj->_orderby($orderBy);
}
return generateSelect(_dataSQL($sqlObj));
}
示例2: while
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. Although none of the code may be
* sold. If you have been sold this script, get a refund.
***************************************************************************/
require '../includes/config.inc.php';
include "loggedin.inc.php";
if (isset($_POST['action']) && $_POST['action'] == "update") {
if (is_dir($main_path . 'themes/' . $_POST['theme'])) {
// Update database
$query = "UPDATE " . $DBPrefix . "settings SET\r\n\t\t\t\ttheme = '" . $_POST['theme'] . "'";
$system->check_mysql(mysql_query($query), $query, __LINE__, __FILE__);
$system->SETTINGS['theme'] = $_POST['theme'];
$ERR = $MSG['26_0005'];
} else {
$ERR = $ERR_068;
}
}
if ($dir = @opendir(realpath($main_path . 'themes'))) {
while (($atheme = readdir($dir)) !== false) {
if ($atheme != '.' && $atheme != '..' && $atheme != 'CVS' && is_dir(realpath($main_path . 'themes') . '/' . $atheme)) {
$THEMES[$atheme] = $atheme;
}
}
@closedir($dir);
}
$selectsetting = $system->SETTINGS['theme'];
loadblock($MSG['26_0003'], $MSG['26_0004'], generateSelect('theme', $THEMES));
$template->assign_vars(array('ERROR' => isset($ERR) ? $ERR : '', 'SITEURL' => $system->SETTINGS['siteurl'], 'TYPE' => 'gra', 'TYPENAME' => $MSG['25_0009'], 'PAGENAME' => $MSG['26_0002']));
$template->set_filenames(array('body' => 'adminpages.html'));
$template->display('body');
示例3: foreach
require_once $beanFiles[$class_name];
$seed = new $class_name();
if (isset($_SESSION['MAILMERGE_SKIP_REL']) && $_SESSION['MAILMERGE_SKIP_REL']) {
$disabled = 'disabled';
} else {
$disabled = '';
}
$oddRow = true;
foreach ($sel_obj as $key => $value) {
$value = str_replace("##", "&", $value);
$value = stripslashes($value);
$code = str_replace('-', '', $key);
$popup_request_data = array('call_back_function' => 'set_return', 'form_name' => 'EditView', 'field_to_name_array' => array('id' => 'rel_id_' . $code, 'name' => 'rel_name_' . $code));
$encoded_popup_request_data = urlencode($json->encode($popup_request_data));
if (empty($selQuery[$relModule][$_SESSION['MAILMERGE_MODULE']])) {
$select = generateSelect($seed, $relModule);
} else {
$select = $selQuery[$relModule][$_SESSION['MAILMERGE_MODULE']];
}
if (empty($whereQuery[$relModule][$_SESSION['MAILMERGE_MODULE']])) {
$where = "{$seed->table_name}.id = ";
} else {
$where = $whereQuery[$relModule][$_SESSION['MAILMERGE_MODULE']];
}
if ($relModule == "Contacts") {
$limitSelect = str_replace('contacts.*', 'contacts.first_name, contacts.last_name, contacts.id, contacts.date_entered', $select);
} else {
$limitSelect = str_replace(strtolower($relModule) . '.*', strtolower($relModule) . '.name, ' . strtolower($relModule) . '.date_entered', $select);
}
$fullQuery = $limitSelect . " WHERE " . $where . "'" . $key . "' ORDER BY date_entered";
$result = $seed->db->limitQuery($fullQuery, 0, 1, true, "Error performing limit query");
示例4: array
$system->SETTINGS['newsbox'] = $_POST['newsbox'];
$system->SETTINGS['newstoshow'] = $_POST['newstoshow'];
$system->SETTINGS['cust_increment'] = $_POST['cust_increment'];
$system->SETTINGS['lastitemsnumber'] = $_POST['lastitemsnumber'];
$system->SETTINGS['higherbidsnumber'] = $_POST['higherbidsnumber'];
$system->SETTINGS['endingsoonnumber'] = $_POST['endingsoonnumber'];
$system->SETTINGS['pagewidth'] = $_POST['pagewidth'];
$system->SETTINGS['pagewidthtype'] = $_POST['pagewidthtype'];
$system->SETTINGS['alignment'] = $_POST['alignment'];
$ERR = $MSG['5019'];
}
$logoURL = $system->SETTINGS['siteurl'] . 'themes/' . $system->SETTINGS['theme'] . '/' . $system->SETTINGS['logo'];
$ALIGNMENT = array('left' => 'Left', 'center' => 'Center', 'right' => 'Right');
$WIDTHTYPE = array('perc' => '%', 'fixed' => 'pixels');
loadblock($MSG['531'], $MSG['556'], 'image', 'logo', $system->SETTINGS['logo']);
loadblock('', $MSG['602'], 'upload', 'logo', $system->SETTINGS['logo']);
$selectsetting = $system->SETTINGS['alignment'];
loadblock($MSG['1056'], $MSG['1057'], generateSelect('alignment', $ALIGNMENT));
loadblock($MGS_2__0051, $MGS_2__0052, 'decimals', 'pagewidth', $system->SETTINGS['pagewidth']);
$selectsetting = $system->SETTINGS['pagewidthtype'];
loadblock('', '', generateSelect('pagewidthtype', $WIDTHTYPE));
loadblock($MSG['5013'], $MSG['5014'], 'decimals', 'lastitemsnumber', $system->SETTINGS['lastitemsnumber']);
loadblock($MSG['5015'], $MSG['5016'], 'decimals', 'higherbidsnumber', $system->SETTINGS['higherbidsnumber']);
loadblock($MSG['5017'], $MSG['5018'], 'decimals', 'endingsoonnumber', $system->SETTINGS['endingsoonnumber']);
loadblock($MSG['532'], $MSG['537'], 'batch', 'loginbox', $system->SETTINGS['loginbox'], $MSG['030'], $MSG['029']);
loadblock($MSG['533'], $MSG['538'], 'batch', 'newsbox', $system->SETTINGS['newsbox'], $MSG['030'], $MSG['029']);
loadblock('', $MSG['554'], 'decimals', 'newstoshow', $system->SETTINGS['newstoshow']);
loadblock($MSG['068'], $MSG['070'], 'batch', 'cust_increment', $system->SETTINGS['cust_increment'], $MSG['030'], $MSG['029']);
$template->assign_vars(array('ERROR' => isset($ERR) ? $ERR : '', 'SITEURL' => $system->SETTINGS['siteurl'], 'IMAGEURL' => $logoURL, 'LINKURL' => $link, 'TYPE' => 'gra', 'TYPENAME' => $MSG['25_0009'], 'PAGENAME' => $MSG['5005']));
$template->set_filenames(array('body' => 'adminpages.html'));
$template->display('body');
示例5: generateSelect
/*
Copyright 2015 SignWise Corporation Ltd.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
?>
<h1>Create document</h1>
<div>
<label><span>Name</span> <input name="name"></label>
<label><span>Output path</span> <input name="output_path" value="document.pdf"></label>
<?php
echo generateSelect('templates', 'Template', 'template');
?>
<label><span>Fields</span> <textarea rows="3" name="fields">[{"placeholder":"[name]", "value": "John Smith"}, {"placeholder":"[location]", "value": "Tallinn"}, {"placeholder": "[date]", "value": "31.12.2015"}]</textarea>
</label>
</div>
<div>
<button>Create document</button>
</div>
示例6: generateSelect
<table class="form-table">
<tr valign="top">
<th scope="row">Select The City:</th>
<td><label><?php
echo $html = generateSelect('city', $city);
?>
</label> </td>
</tr>
</table>
<table class="form-table">
<tr valign="top">
<th scope="row">Select The County:</th>
<td><label><?php
echo $html = generateSelect('country', $country);
?>
</label> </td>
</tr>
</table>
<table class="form-table">
<tr valign="top">
<th scope="row">Select The Catagory:</th>
<td><label>
<select name="type" id="property">
<option value="">---Select Any Type---</option>
<option value="Residential">Residential</option>
<option value="Commercial">Commercial</option>
<option value="Acreage">Acreage</option>
<option value="Multi-Family">Multi-Family</option>
示例7: generateForm
function generateForm()
{
return new clsDiv(array('children' => array(new clsFieldset(array('children' => array(new clsLegend(array('child' => new clsLiteral('Fieldset one'))), generateSelect(), generateInputText()))), new clsFieldset(array('children' => array(new clsLegend(array('child' => new clsLiteral('Fieldset two'))), generateInputCheckbox(), generateInputRadioButton(), generateInputTextArea(), generateInputButton(), generateInputHidden()))))));
}
示例8: define
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. Although none of the code may be
* sold. If you have been sold this script, get a refund.
***************************************************************************/
define('InAdmin', 1);
$current_page = 'settings';
include '../common.php';
include $include_path . 'functions_admin.php';
include 'loggedin.inc.php';
unset($ERR);
if (isset($_POST['action']) && $_POST['action'] == 'update') {
// Update database
$query = "UPDATE " . $DBPrefix . "settings set \n\t\t\t timecorrection = " . intval($_POST['timecorrection']) . ",\n\t\t\t datesformat = '" . $_POST['datesformat'] . "'";
$system->check_mysql(mysql_query($query), $query, __LINE__, __FILE__);
$system->SETTINGS['timecorrection'] = $_POST['timecorrection'];
$system->SETTINGS['datesformat'] = $_POST['datesformat'];
$ERR = $MSG['347'];
}
$TIMECORRECTION = array();
for ($i = 12; $i > -13; $i--) {
$TIMECORRECTION[$i] = $MSG['TZ_' . $i];
}
$selectsetting = $system->SETTINGS['timecorrection'];
$html = generateSelect('timecorrection', $TIMECORRECTION);
//load the template
loadblock($MSG['363'], $MSG['379'], 'datestacked', 'datesformat', $system->SETTINGS['datesformat'], array($MSG['382'], $MSG['383']));
loadblock($MSG['346'], $MSG['345'], 'dropdown', 'timecorrection', $system->SETTINGS['timecorrection']);
$template->assign_vars(array('ERROR' => isset($ERR) ? $ERR : '', 'SITEURL' => $system->SETTINGS['siteurl'], 'OPTIONHTML' => $html, 'TYPENAME' => $MSG['25_0008'], 'PAGENAME' => $MSG['344'], 'DROPDOWN' => $html));
$template->set_filenames(array('body' => 'adminpages.tpl'));
$template->display('body');
示例9: mysql_query
$agent = mysql_query($sql);
while ($row = mysql_fetch_assoc($agent)) {
$tkeqry[] = $row;
}
$sel = array('---Select Any Agent---' => '');
foreach ($tkeqry as $key => $slec) {
$sel[$slec['agent_license_no'] . ' - ' . $slec['Name']] = $slec['agent_license_no'];
}
// echo "<pre>";print_r($sel);
?>
<table class="form-table">
<tr valign="top">
<th scope="row">Select The Agent:</th>
<td><label><?php
echo $html = generateSelect('agent', $sel);
?>
</label> </td>
</tr>
</table>
<?php
// include("array.php") ;
?>
<table class="form-table">
<tr valign="top">
<th scope="row">Select The City:</th>
<td><label>
<?php
//echo $html = generateSelect('city', $city);
示例10: generateSelect
echo "</label>";
$html = generateSelect('datamcsco', $grading);
echo $html;
echo "</p>";
echo "<p>";
echo "<label>Aerial Surveillance";
echo "<span class='small'>Select from list</span>";
echo "</label>";
$html = generateSelect('aerialsurv', $grading);
echo $html;
echo "</p>";
echo "<p>";
echo "<label>Legislation";
echo "<span class='small'>and Management Plans</span>";
echo "</label>";
$html = generateSelect('legislation', $grading);
echo $html;
echo "</p>";
echo "<button type='submit' name='submit'>Submit Details</button>";
echo "<div class='spacer'></div>";
echo "</form>";
?>
</div>
</div>
<div id="aside">
<p> <?php
echo $msg;
?>
</p>
</div>
<div id="footer">
示例11: json_decode
$input = "";
//Decode JSON data
$array = json_decode($_POST['jsonValue']);
$input .= '<form class="autoGenForm" action="##PATH OF PHP FILE##" method="post">' . "\n";
$x = 0;
//Foreach array item, create inputs
foreach ($array as $theArray) {
//if is textarea, generate textarea
if ($theArray->field == "textarea") {
$input .= generateTextArea($x, $theArray->label, $theArray->field, $theArray->required);
} elseif ($theArray->field == "radio") {
$input .= generateRadio($x, $theArray, $theArray->required);
} elseif ($theArray->field == "checkbox") {
$input .= generateCheckbox($x, $theArray);
} elseif ($theArray->field == "select") {
$input .= generateSelect($x, $theArray, $theArray->required);
} else {
$input .= generateRegular($x, $theArray->label, $theArray->field, $theArray->required);
}
$x++;
}
//Create submit buttom
$input .= '<div class="inputContainer">' . "\n";
$input .= '<input type="submit" id="submit" value="submit">' . "\n";
$input .= '</div>' . "\n";
//End Form
$input .= '</form>';
//Generate javascript. We want to validate form.
$input .= '
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<script src="http://ajax.aspnetcdn.com/ajax/jquery.validate/1.14.0/jquery.validate.min.js"></script>
示例12: checkRequired
<div class="toolbar">
<div id="leftbutton"><a href="./season.php">Back</a></div>
<div id="rightbutton"><a href="http://m.meredith.edu">Home</a></div>
<h1>Request Tickets</h1>
</div>
<div id="copyBase">
<form action="mailto:boxoffice@meredith.edu?subject=Ticket Request" enctype="text/plain" method="post" onsubmit="return checkRequired(this);">
<div class="nav">
<li>
<? echo "<b>$event</b><input name='Event' id='Event' type='hidden' value='".$event."'>"; ?>
</li>
<li><b>Select the date & time:</b></li>
<li>
<? $dropdown = generateSelect('Event Date', $dates);
echo $dropdown;
?>
</li>
<li><b>Enter your name:</b>
<fieldset class="inputcombo">
<input class="forminput" type="text" name="Name" value="" required>
</fieldset>
</li>
<li><b>Enter your email address:</b>
<fieldset class="inputcombo">
<input class="forminput" type="text" name="Email Address" value="" required>
</fieldset>
<li><b>Enter the number of tickets:</b></li>
<li><input type="tel" size="3" maxlength="3" name="General Tickets" value="0"> General Admission</li>
<li><input type="tel" size="3" maxlength="3" name="Student & Seniors Tickets" value="0"> Students & Seniors</li>
示例13: generateSelect
<tr>
<td width="250">Name:</td>
<td width="247"><input name="name" size="30" autocomplete="off" value="" type="text" /></td>
</tr>
<tr>
<td>Department:</td>
<td><input name="dept" size="100" type="text" /></td>
</tr>
<tr>
<td><label for="progrm">Programme:</label></td>
<?php
$html = generateSelect('progrm', $prog);
echo '<td>' . $html . '</td>';
?>
</tr>
<tr>
<td>Hostel-Room Number:</td>
<td><input name="hstRoom" size="30" type="text" /></td>
</tr>
<tr>
<td>Mobile:</td>
<td><input name="phone" size="30" maxlength="10" /></td>
示例14: stripslashes
break;
}
$subject = stripslashes($_POST['subject']);
$content = stripslashes($_POST['content']);
$headers = 'From:' . $system->SETTINGS['sitename'] . ' <' . $system->SETTINGS['adminmail'] . '>' . "\n" . 'Content-Type: text/html; charset=' . $CHARSET;
$result = mysql_query($query);
while ($row = mysql_fetch_array($result)) {
if (mail($row['email'], $subject, $content, $headers)) {
$COUNTER++;
}
}
if (!$result) {
$ERR = $ERR_001;
} else {
$ERR = $COUNTER . $MSG['5300'];
}
}
}
$USERSFILTER = array("all" => $MSG['5296'], "active" => $MSG['5291'], "admin" => $MSG['5294'], "fee" => $MSG['5293'], "confirmed" => $MSG['5292']);
$selectsetting = isset($_POST['usersfilter']) ? $_POST['usersfilter'] : '';
loadblock($MSG['5299'], '', generateSelect('usersfilter', $USERSFILTER));
loadblock($MSG['332'], '', 'text', 'subject', $system->SETTINGS['subject'], $MSG['030'], $MSG['029']);
$oFCKeditor = new FCKeditor('content');
$oFCKeditor->BasePath = '../fck/';
$oFCKeditor->Value = stripslashes($system->SETTINGS['content']);
$oFCKeditor->Width = '550';
$oFCKeditor->Height = '400';
loadblock($MSG['605'], $MSG['30_0055'], $oFCKeditor->CreateHtml());
$template->assign_vars(array('ERROR' => isset($ERR) ? $ERR : '', 'SITEURL' => $system->SETTINGS['siteurl'], 'TYPE' => 'use', 'TYPENAME' => $MSG['25_0010'], 'PAGENAME' => $MSG['607']));
$template->set_filenames(array('body' => 'adminpages.html'));
$template->display('body');
示例15: mysql_query
break;
case 'fee':
$query .= ' AND suspended = 9';
break;
case 'confirmed':
$query .= ' AND suspended = 8';
break;
}
$headers = 'From:' . $system->SETTINGS['sitename'] . ' <' . $system->SETTINGS['adminmail'] . '>' . "\n" . 'Content-Type: text/html; charset=' . $CHARSET;
$res = mysql_query($query);
$system->check_mysql($res, $query, __LINE__, __FILE__);
while ($row = mysql_fetch_assoc($res)) {
if (mail($row['email'], $subject, $content, $headers)) {
$COUNTER++;
}
}
$ERR = $COUNTER . $MSG['5300'];
}
} elseif (isset($_POST['action']) && $_POST['action'] == 'preview') {
$is_preview = true;
}
$USERSFILTER = array('all' => $MSG['5296'], 'active' => $MSG['5291'], 'admin' => $MSG['5294'], 'fee' => $MSG['5293'], 'confirmed' => $MSG['5292']);
$selectsetting = isset($_POST['usersfilter']) ? $_POST['usersfilter'] : '';
$CKEditor = new CKEditor();
$CKEditor->basePath = $main_path . 'ckeditor/';
$CKEditor->returnOutput = true;
$CKEditor->config['width'] = 550;
$CKEditor->config['height'] = 400;
$template->assign_vars(array('ERROR' => isset($ERR) ? $ERR : '', 'SITEURL' => $system->SETTINGS['siteurl'], 'SELECTBOX' => generateSelect('usersfilter', $USERSFILTER), 'SUBJECT' => $subject, 'EDITOR' => $CKEditor->editor('content', stripslashes($content)), 'PREVIEW' => $content, 'B_PREVIEW' => $is_preview));
$template->set_filenames(array('body' => 'newsletter.tpl'));
$template->display('body');