本文整理汇总了PHP中Search函数的典型用法代码示例。如果您正苦于以下问题:PHP Search函数的具体用法?PHP Search怎么用?PHP Search使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了Search函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: INDEX
function INDEX()
{
if (isset($_GET["mail"])) {
$jsshowmail = "\n\t\t<script>\n\t\t\tLoadjs('domains.quarantine.php?message-id={$_GET["mail"]}');\n\t\t</script>\n\t\t";
}
if (isset($_GET["search"])) {
$lsatquarantines = Search();
$title = 'your_query';
} else {
$lsatquarantines = LastQuarantines();
$title = 'last_quarantine_files';
}
$user = new user($_SESSION["uid"]);
$show["10"] = 10;
$show["20"] = 20;
$show["50"] = 50;
$show["100"] = 100;
$show["150"] = 150;
$show["300"] = 300;
$show["500"] = 500;
if ($_GET["show"] == null) {
$_GET["show"] = 50;
}
$show = Field_array_Hash($show, "show", $_GET["show"]);
$html = "\n<table style='width:100%'>\n<tr>\n<td valign='top'>\n<img src='img/90-quarantaine.png'>\n</td>\n<td valign='top'>\n<form name=FFM1 method=get>\n<input type='hidden' name='search' value='yes'>\n<center>\n" . RoundedLightGrey("\n<div class=caption>{star_supported}</div>\n<table align=center class=table_form>\n<tr><td colspan=2><H3>{search_text}</H3></td></tr>\n<tr><td nowrap class=legend><strong>{by_sender}:</td><td align='left'>" . Field_text('bySender', $_GET["bySender"]) . "</td></tr>\n<tr><td nowrap class=legend><strong>{by_subject}:</td><td align='left'>" . Field_text('BySubject', $_GET["BySubject"]) . "</td></tr>\n<tr><td nowrap class=legend><strong>{show}:</td><td align='left'>{$show} {rows}</td></tr>\n<tr><td colspan=2 align=right><input type=submit value='{search} »'></td></tr>\n<tr><td colspan=2 class=legend>{for}: " . implode(", ", $user->HASH_ALL_MAILS) . "</td></tr>\n</table>") . "\n</center>\n</form>\n</td>\n</tr>\n</table>\n\n\n<p> </p>\n\t<table style='width:100%' align=center>\n\t\t<tr>\n\t\t\t<td width=1% valign='top'>\n\t\t\t\t<H4>{{$title}}</H4>{$lsatquarantines}\n\t\t\t</td>\n\t\t</tr>\n\t</table>\n{$jsshowmail}\n";
$JS["JS"][] = "js/user.quarantine.js";
$tpl = new template_users('{query_quarantine}', $html, 0, 0, 0, 0, $JS);
echo $tpl->web_page;
}
示例2: Search
function Search($path)
{
if (is_dir($path)) {
$dir = opendir($path);
while ($item = readdir($dir)) {
if ($item == '.' || $item == '..') {
continue;
}
Search($path . '/' . $item);
}
closedir($dir);
} else {
if (substr($path, -4) == '.php') {
//mb_convert_encoding
$str = file_get_contents($path);
$str = mb_convert_encoding($str, "utf8");
}
}
}
示例3: StaffWidgets
echo '</TABLE>';
if ($extra['second_col']) {
echo '<BR /><TABLE>' . $extra['second_col'] . '</TABLE>';
}
echo '</TD></TR>';
echo '<TR class="valign-top"><TD><TABLE class="width-100p cellspacing-0 cellpadding-0"><TR><TD>';
if ($_REQUEST['advanced'] == 'Y') {
$extra['search'] = '';
StaffWidgets('all', $extra);
if ($extra['search']) {
echo '<TABLE class="postbox cellpadding-0 cellspacing-0"><TR><TH>';
echo '<H3>' . _('Widgets') . '</H3></TH></TR>';
echo $extra['search'];
echo '</TABLE><br />';
}
if ($user_fields = Search('staff_fields_all', is_array($extra['staff_fields']) ? $extra['staff_fields'] : array())) {
echo '<TABLE class="postbox cellpadding-0 cellspacing-0"><TR><TH>';
echo '<H3>' . _('User Fields') . '</H3></TH></TR><TR><TD>';
echo $user_fields;
echo '</TD></TR>';
echo '</TABLE>';
}
echo '<A href="' . PreparePHP_SELF($_REQUEST, array(), array('advanced' => 'N')) . '">' . _('Basic Search') . '</A>';
} else {
echo '<TR><TD><BR /><A href="' . PreparePHP_SELF($_REQUEST, array(), array('advanced' => 'Y')) . '">' . _('Advanced Search') . '</A>';
}
echo '</TD></TR></TABLE></TD>';
//if($extra['second_col'])
// echo '<TD>'.$extra['second_col'].'</TD>';
echo '</TR>';
echo '</TABLE>';
示例4: StaffWidgets
echo '</TABLE>';
if ($extra['second_col']) {
echo '<BR><TABLE>' . $extra['second_col'] . '</TABLE>';
}
echo '</TD></TR>';
echo '<TR valign=top><TD><TABLE cellpadding=0 cellspacing=0 width=100%>';
if ($_REQUEST['advanced'] == 'Y') {
$extra['search'] = '';
StaffWidgets('all', $extra);
echo '<TR><TD>';
echo '<FONT COLOR=' . Preferences('HEADER') . '><B>' . _('Widgets') . '</B></FONT><BR>';
echo $extra['search'];
echo '</TD></TR>';
echo '<TR><TD>';
echo '<FONT COLOR=' . Preferences('HEADER') . '><B>' . _('User Fields') . '</B></FONT><BR>';
Search('staff_fields_all', is_array($extra['staff_fields']) ? $extra['staff_fields'] : array());
echo '</TD></TR>';
echo '<TR><TD><BR><A href=' . PreparePHP_SELF($_REQUEST, array(), array('advanced' => 'N')) . '>' . _('Basic Search') . '</A></TD></TR>';
} else {
echo '<TR><TD><BR><A href=' . PreparePHP_SELF($_REQUEST, array(), array('advanced' => 'Y')) . '>' . _('Advanced Search') . '</A></TD></TR>';
}
echo '</TABLE></TD>';
//if($extra['second_col'])
// echo '<TD>'.$extra['second_col'].'</TD>';
echo '</TR>';
echo '</TABLE>';
echo '</FORM>';
// set focus to last name text box
echo '<script type="text/javascript"><!--
document.search.last.focus();
--></script>';
示例5: StaffWidgets
<?php
StaffWidgets('fsa_status_active');
StaffWidgets('fsa_barcode');
StaffWidgets('fsa_exists_Y');
Search('staff_id', $extra);
if ($_REQUEST['modfunc'] == 'submit') {
if ($_REQUEST['submit']['cancel']) {
if (DeletePromptX(_('Sale'), _('Cancel'))) {
unset($_SESSION['FSA_sale']);
}
} elseif ($_REQUEST['submit']['save']) {
if (count($_SESSION['FSA_sale'])) {
$items_RET = DBGet(DBQuery("SELECT DESCRIPTION,SHORT_NAME,PRICE_STAFF FROM FOOD_SERVICE_ITEMS WHERE SCHOOL_ID='" . UserSchool() . "'"), array(), array('SHORT_NAME'));
// get next transaction id
$id = DBGet(DBQuery('SELECT ' . db_seq_nextval('FOOD_SERVICE_STAFF_TRANSACTIONS_SEQ') . ' AS SEQ_ID ' . FROM_DUAL));
$id = $id[1]['SEQ_ID'];
$item_id = 0;
foreach ($_SESSION['FSA_sale'] as $item_sn) {
$price = $items_RET[$item_sn][1]['PRICE_STAFF'];
$fields = 'ITEM_ID,TRANSACTION_ID,AMOUNT,SHORT_NAME,DESCRIPTION';
$values = "'" . $item_id++ . "','" . $id . "','-" . $price . "','" . $items_RET[$item_sn][1]['SHORT_NAME'] . "','" . $items_RET[$item_sn][1]['DESCRIPTION'] . "'";
$sql = "INSERT INTO FOOD_SERVICE_STAFF_TRANSACTION_ITEMS (" . $fields . ") values (" . $values . ")";
DBQuery($sql);
}
$sql1 = "UPDATE FOOD_SERVICE_STAFF_ACCOUNTS SET TRANSACTION_ID='" . $id . "',BALANCE=BALANCE+(SELECT sum(AMOUNT) FROM FOOD_SERVICE_STAFF_TRANSACTION_ITEMS WHERE TRANSACTION_ID='" . $id . "') WHERE STAFF_ID='" . UserStaffID() . "'";
$fields = 'TRANSACTION_ID,STAFF_ID,SYEAR,SCHOOL_ID,BALANCE,TIMESTAMP,SHORT_NAME,DESCRIPTION,SELLER_ID';
$values = "'" . $id . "','" . UserStaffID() . "','" . UserSyear() . "','" . UserSchool() . "',(SELECT BALANCE FROM FOOD_SERVICE_STAFF_ACCOUNTS WHERE STAFF_ID='" . UserStaffID() . "'),CURRENT_TIMESTAMP,'" . $menus_RET[$_REQUEST['menu_id']][1]['TITLE'] . "','" . $menus_RET[$_REQUEST['menu_id']][1]['TITLE'] . ' - ' . DBDate() . "','" . User('STAFF_ID') . "'";
$sql2 = 'INSERT INTO FOOD_SERVICE_STAFF_TRANSACTIONS (' . $fields . ') values (' . $values . ')';
DBQuery('BEGIN; ' . $sql1 . '; ' . $sql2 . '; COMMIT');
unset($_SESSION['FSA_sale']);
示例6: array
// {
// $extra['extra_header_left'] .= '<TD><INPUT type=checkbox name=mp_arr[] value='.$mp['MARKING_PERIOD_ID'].'>'.$mp['SHORT_NAME'].'</TD>';
//
// }
// $extra['extra_header_left'] .= '</TR></TABLE></TD></TABLE>';
/*********************************************************************************/
$extra['link'] = array('FULL_NAME' => false);
$extra['SELECT'] = ",s.STUDENT_ID AS CHECKBOX";
$extra['functions'] = array('CHECKBOX' => '_makeChooseCheckbox');
$extra['columns_before'] = array('CHECKBOX' => '</A><INPUT type=checkbox value=Y name=controller checked onclick="checkAll(this.form,this.form.controller.checked,\'st_arr\');"><A>');
$extra['options']['search'] = false;
$extra['new'] = true;
$extra['WHERE'] .= " AND s.STUDENT_ID IN (SELECT DISTINCT STUDENT_ID FROM student_standards)";
Widgets('course');
Widgets('gpa');
Widgets('class_rank');
Widgets('letter_grade');
Search('student_id', $extra, 'true');
if ($_REQUEST['search_modfunc'] == 'list') {
echo '<BR><CENTER><INPUT type=submit class=btn_xxlarge value=\'Create Standard Report Cards for Selected Students\'></CENTER>';
echo "</FORM>";
}
}
function _makeChooseCheckbox($value, $title)
{
return '<INPUT type=checkbox name=st_arr[] value=' . $value . ' checked>';
}
function _makeTeacher($teacher, $column)
{
return substr($teacher, strrpos(str_replace(' - ', ' ^ ', $teacher), '^') + 2);
}
示例7: PopTable
echo '<font style="color:red"><b>Start date cannot be before school\'s start date</b></font>';
}
if ($_REQUEST['modfunc'] == 'search') {
echo '<BR>';
PopTable('header', 'Advanced');
echo "<FORM name=percentform action=Modules.php?modname=" . strip_tags(trim($_REQUEST[modname])) . "&list_by_day=" . strip_tags(trim($_REQUEST[list_by_day])) . "&day_start=" . strip_tags(trim($_REQUEST[day_start])) . "&day_end=" . strip_tags(trim($_REQUEST[day_end])) . "&month_start=" . strip_tags(trim($_REQUEST[month_start])) . "&month_end=" . strip_tags(trim($_REQUEST[month_end])) . "&year_start=" . strip_tags(trim($_REQUEST[year_start])) . "&year_end=" . strip_tags(trim($_REQUEST[year_end])) . " method=POST>";
echo '<TABLE>';
Search('general_info', $extra['grades']);
if (!isset($extra)) {
$extra = array();
}
Widgets('user', $extra);
if ($extra['search']) {
echo $extra['search'];
}
Search('student_fields', is_array($extra['student_fields']) ? $extra['student_fields'] : array());
if (User('PROFILE') == 'admin') {
echo '<CENTER><INPUT type=checkbox name=_search_all_schools value=Y' . (Preferences('DEFAULT_ALL_SCHOOLS') == 'Y' ? ' CHECKED' : '') . '><font color=black>Search All Schools</font></CENTER><BR>';
}
echo '<CENTER>' . Buttons('Submit') . '</CENTER>';
echo '</FORM>';
PopTable('footer');
}
if (!$_REQUEST['modfunc']) {
if (!isset($extra)) {
$extra = array();
}
Widgets('user');
if ($_REQUEST['advanced'] == 'Y') {
Widgets('all');
}
示例8: Search
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
#***************************************************************************************
include '../../Redirect_modules.php';
include 'modules/Grades/config.inc.php';
require_once 'functions/_makeLetterGrade.fnc.php';
$_openSIS['allow_edit'] = false;
if ($_REQUEST['_openSIS_PDF']) {
$do_stats = false;
}
#DrawHeader(ProgramTitle());
#Search('student_id','','true');
Search('student_id');
$MP_TYPE_RET = DBGet(DBQuery("SELECT MP_TYPE FROM MARKING_PERIODS WHERE MARKING_PERIOD_ID=" . UserMP() . " LIMIT 1"));
$MP_TYPE = $MP_TYPE_RET[1]['MP_TYPE'];
if ($MP_TYPE == 'year') {
$MP_TYPE = 'FY';
} else {
if ($MP_TYPE == 'semester') {
$MP_TYPE = 'SEM';
} else {
if ($MP_TYPE == 'quarter') {
$MP_TYPE = 'QTR';
} else {
$MP_TYPE = '';
}
}
}
示例9: dirname
<?php
/**
* Template part for displaying results in search pages.
*
* @link https://codex.wordpress.org/Template_Hierarchy
*
* @package Bemmy
*/
require_once dirname(dirname(__FILE__)) . '/components/Search/Search.php';
?>
<?php
Search();
示例10: Search
function Search($googleFonts, $term)
{
if (is_array($googleFonts)) {
//print $term;
$return_array = array();
if ($term == '') {
$return_array = $googleFonts;
} else {
$count = count($googleFonts);
$i = 0;
foreach ($googleFonts as $k => $v) {
$k = '&' . $k;
$exists = stripos($k, $term) ? true : false;
if ($exists) {
$value = str_replace('&', '', $k);
$label = ucwords(str_replace('_', ' ', $v));
$return_array[] = array('key' => $value, 'value' => $label);
}
$i++;
}
}
return $return_array;
}
return false;
}
if (isset($_POST['search'])) {
$returnArray = Search($googleFonts, isset($_POST['term']) ? $_POST['term'] : '');
$count = count($googleFonts);
header('Content-type: application/json');
echo json_encode($returnArray);
}
示例11: getWhereCondition
function getWhereCondition($currentModule)
{
global $log, $default_charset, $adb;
global $column_array, $table_col_array, $mod_strings, $current_user;
$log->debug("Entering getWhereCondition(" . $currentModule . ") method ...");
if ($_REQUEST['searchtype'] == 'advance') {
$adv_string = '';
$url_string = '';
if (isset($_REQUEST['search_cnt'])) {
$tot_no_criteria = vtlib_purify($_REQUEST['search_cnt']);
}
if ($_REQUEST['matchtype'] == 'all') {
$matchtype = "and";
} else {
$matchtype = "or";
}
for ($i = 0; $i < $tot_no_criteria; $i++) {
if ($i == $tot_no_criteria - 1) {
$matchtype = "";
}
$table_colname = 'Fields' . $i;
$search_condition = 'Condition' . $i;
$search_value = 'Srch_value' . $i;
list($tab_col_val, $typeofdata) = split("::::", $_REQUEST[$table_colname]);
$tab_col = str_replace('\'', '', stripslashes($tab_col_val));
$srch_cond = str_replace('\'', '', stripslashes($_REQUEST[$search_condition]));
$srch_val = $_REQUEST[$search_value];
$srch_val = function_exists(iconv) ? @iconv("UTF-8", $default_charset, $srch_val) : $srch_val;
$url_string .= "&Fields" . $i . "=" . $tab_col . "&Condition" . $i . "=" . $srch_cond . "&Srch_value" . $i . "=" . urlencode($srch_val);
$srch_val = $adb->sql_escape_string($srch_val);
list($tab_name, $column_name) = split("[.]", $tab_col);
$uitype = getUItype($currentModule, $column_name);
//added to allow search in check box type fields(ex: product active. it will contain 0 or 1) using yes or no instead of 0 or 1
if ($uitype == 56) {
if (strtolower($srch_val) == 'yes') {
$adv_string .= " " . getSearch_criteria($srch_cond, "1", $tab_name . '.' . $column_name) . " " . $matchtype;
} elseif (strtolower($srch_val) == 'no') {
$adv_string .= " " . getSearch_criteria($srch_cond, "0", $tab_name . '.' . $column_name) . " " . $matchtype;
} else {
$adv_string .= " " . getSearch_criteria($srch_cond, "-1", $tab_name . '.' . $column_name) . " " . $matchtype;
}
} elseif ($uitype == 15 || $uitype == 16) {
if (is_uitype($uitype, '_picklist_')) {
// Get all the keys for the for the Picklist value
$mod_keys = array_keys($mod_strings, $srch_val);
if (sizeof($mod_keys) >= 1) {
// Iterate on the keys, to get the first key which doesn't start with LBL_ (assuming it is not used in PickList)
foreach ($mod_keys as $mod_idx => $mod_key) {
$stridx = strpos($mod_key, 'LBL_');
// Use strict type comparision, refer strpos for more details
if ($stridx !== 0) {
$srch_val = $mod_key;
if (getFieldVisibilityPermission("Calendar", $current_user->id, 'taskstatus') == '0' && ($tab_col == "vtiger_activity.status" || $tab_col == "vtiger_activity.eventstatus")) {
if ($srch_cond == 'dcts' || $srch_cond == 'isn' || $srch_cond == 'is') {
$re_cond = "and";
} else {
$re_cond = "or";
}
if ($srch_cond == 'is' && $srch_val != '') {
$re_cond = "or";
}
$adv_string .= " (" . getSearch_criteria($srch_cond, $srch_val, 'vtiger_activity.status') . " " . $re_cond;
$adv_string .= " " . getSearch_criteria($srch_cond, $srch_val, 'vtiger_activity.eventstatus') . " )" . $matchtype;
} else {
$adv_string .= " " . getSearch_criteria($srch_cond, $srch_val, $tab_name . '.' . $column_name) . " " . $matchtype;
}
break;
} else {
//if the key contains the LBL, then return the original srch_val.
$adv_string .= " " . getSearch_criteria($srch_cond, $srch_val, $tab_name . '.' . $column_name) . " " . $matchtype;
}
}
} else {
if (getFieldVisibilityPermission("Calendar", $current_user->id, 'taskstatus') == '0' && ($tab_col == "vtiger_activity.status" || $tab_col == "vtiger_activity.eventstatus")) {
if ($srch_cond == 'dcts' || $srch_cond == 'isn' || $srch_cond == 'is') {
$re_cond = "and";
} else {
$re_cond = "or";
}
if ($srch_cond == 'is' && $srch_val != '') {
$re_cond = "or";
}
$adv_string .= " (" . getSearch_criteria($srch_cond, $srch_val, 'vtiger_activity.status') . " " . $re_cond;
$adv_string .= " " . getSearch_criteria($srch_cond, $srch_val, 'vtiger_activity.eventstatus') . " )" . $matchtype;
} else {
$adv_string .= " " . getSearch_criteria($srch_cond, $srch_val, $tab_col) . " " . $matchtype;
}
}
}
} elseif ($tab_col == "vtiger_crmentity.smownerid") {
$adv_string .= " (" . getSearch_criteria($srch_cond, $srch_val, 'vtiger_users.user_name') . " or";
$adv_string .= " " . getSearch_criteria($srch_cond, $srch_val, 'vtiger_groups.groupname') . " )" . $matchtype;
} elseif ($tab_col == "vtiger_cntactivityrel.contactid") {
$adv_string .= " (" . getSearch_criteria($srch_cond, $srch_val, 'vtiger_contactdetails.firstname') . " or";
$adv_string .= " " . getSearch_criteria($srch_cond, $srch_val, 'vtiger_contactdetails.lastname') . " )" . $matchtype;
} elseif (in_array($column_name, $column_array)) {
$adv_string .= " " . getValuesforColumns($column_name, $srch_val, $srch_cond) . " " . $matchtype;
} else {
$adv_string .= " " . getSearch_criteria($srch_cond, $srch_val, $tab_col) . " " . $matchtype;
}
//.........这里部分代码省略.........
示例12: DrawHeaderHome
// DrawHeaderHome( 'Selected User: '.$RET[1]['FIRST_NAME'].' '.$RET[1]['LAST_NAME'].'(<A onclick="close_window();" HREF=Modules.php?modname='.$_REQUEST['modname'].'&search_modfunc=list&next_modname=Users/User.php&ajax=true&bottom_back=true&return_session=true target=body ><font color=red>Deselect</font></A>) <A onclick="close_window();" HREF=Modules.php?modname='.$_REQUEST['modname'].'&search_modfunc=list&next_modname=Users/User.php&ajax=true&bottom_back=true&return_session=true target=body>Back to User List</A>');
} else {
DrawHeaderHome('Selected User: ' . $RET[1]['FIRST_NAME'] . ' ' . $RET[1]['LAST_NAME'] . ' (<A HREF=Side.php?staff_id=new&modcat=' . $_REQUEST['modcat'] . '><font color=red>Deselect</font></A>)');
}
}
}
#############################################
if ($_REQUEST['include'] != 'Attendance/Missing_Attendance.php') {
if (!UserStaffID()) {
Search('teacher_id', 'teachers_option');
} else {
$profile = DBGet(DBQuery('SELECT PROFILE FROM staff WHERE STAFF_ID=\'' . UserStaffID() . '\''));
if ($profile[1]['PROFILE'] != 'teacher') {
unset($_SESSION['staff_id']);
echo '<script language=JavaScript>parent.side.location="' . $_SESSION['Side_PHP_SELF'] . '?modcat="+parent.side.document.forms[0].modcat.value;</script>';
Search('teacher_id', 'teachers_option');
}
}
} else {
Search_Miss_Attn('staff_id', 'teacher');
}
if (UserStaffID()) {
$QI = DBQuery('SELECT DISTINCT cpv.ID,cpv.PERIOD_ID,cp.COURSE_PERIOD_ID,sp.TITLE,sp.SHORT_NAME,cp.MARKING_PERIOD_ID,cpv.DAYS,sp.SORT_ORDER,c.TITLE AS COURSE_TITLE,cp.TITLE as COURSE_PERIOD_TITLE FROM course_periods cp,course_period_var cpv, school_periods sp,courses c WHERE c.COURSE_ID=cp.COURSE_ID AND cpv.PERIOD_ID=sp.PERIOD_ID AND cp.COURSE_PERIOD_ID=cpv.COURSE_PERIOD_ID AND cp.SYEAR=\'' . UserSyear() . '\' AND cp.SCHOOL_ID=\'' . UserSchool() . '\' AND (cp.TEACHER_ID=\'' . UserStaffID() . '\' OR cp.SECONDARY_TEACHER_ID=\'' . UserStaffID() . '\') ORDER BY sp.SORT_ORDER ');
$RET = DBGet($QI);
// get the fy marking period id, there should be exactly one fy marking period
$fy_id = DBGet(DBQuery('SELECT MARKING_PERIOD_ID FROM school_years WHERE SYEAR=\'' . UserSyear() . '\' AND SCHOOL_ID=\'' . UserSchool() . '\''));
$fy_id = $fy_id[1]['MARKING_PERIOD_ID'];
if (isset($cp_id)) {
$block_schedule_check = DBGet(DBQuery("SELECT COUNT(*) AS TOTAL FROM course_period_var WHERE COURSE_PERIOD_ID='" . $cp_id . "' \r\n AND COURSE_PERIOD_DATE IS NULL "));
// print_r($block_schedule_check);
// echo "SELECT COUNT(*) AS TOTAL FROM course_period_var WHERE COURSE_PERIOD_ID='".$cp_id."'
示例13: database
$flag = 2;
} else {
$flag = 3;
}
}
//echo "flag = ".$flag;
//echo "value = ".$value."<br>";
//$path = "D:\Program Files\wamp";
//chdir($path);
include "db.php";
include "InsertWord.php";
include "Search.php";
$db = new database();
//echo "path: ".$path."<br>";
GetAllH($path, $db);
Search($flag, $word, $db);
}
?>
<?php
function GetAllH($path, $db)
{
$CurrentD = $path;
chdir($CurrentD);
if (false !== ($handle = opendir($CurrentD))) {
while (false !== ($Name = readdir($handle))) {
if ($Name != "." && $Name != "..") {
if (is_dir($CurrentD . "\\" . $Name)) {
$New_dir = $CurrentD . "\\" . $Name;
示例14: die
Hour LIKE '%%' OR
Minutes LIKE '%%' OR
Place LIKE '%%' OR
Category LIKE '%%' OR
Check_in LIKE '%%' OR
Organizer LIKE '%%')") or die(mysql_error());
$row = mysql_fetch_array($query) or die(mysql_error());
$rows = array();
while($rows[]=mysql_fetch_array($query));
//should not contain all rows
print_r( $rows );
}
}
if(isset($_POST['submit']))
{ Search(); }
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<link rel="stylesheet" type="text/css" href="js/jquery-ui/jquery-ui.css">
<link rel="stylesheet" type="text/css" href="css/global.css">
<link rel="stylesheet" type="text/css" href="css/search_results.css">
</head>
<body>
<script src="js/jquery.js"></script>
<script src="js/jquery-ui/jquery-ui.min.js"></script>
示例15: DrawBC
#***************************************************************************************
include '../../Redirect_modules.php';
$cp_id = $_REQUEST['cp_id'];
if (UserStaffID() || $_REQUEST['staff_id']) {
echo "<FORM action=Modules.php?modname={$_REQUEST['modname']}&dt=1 method=POST>";
}
DrawBC("Users > Teacher Programs");
if ($_REQUEST['include'] != 'Attendance/Missing_Attendance.php') {
if (!UserStaffID()) {
Search('staff_id', 'teacher');
} else {
$profile = DBGet(DBQuery("SELECT PROFILE FROM STAFF WHERE STAFF_ID='" . UserStaffID() . "'"));
if ($profile[1]['PROFILE'] != 'teacher') {
unset($_SESSION['staff_id']);
echo '<script language=JavaScript>parent.side.location="' . $_SESSION['Side_PHP_SELF'] . '?modcat="+parent.side.document.forms[0].modcat.value;</script>';
Search('staff_id', 'teacher');
}
}
} else {
Search_Miss_Attn('staff_id', 'teacher');
}
if (UserStaffID()) {
$QI = DBQuery("SELECT DISTINCT cp.PERIOD_ID,cp.COURSE_PERIOD_ID,sp.TITLE,sp.SHORT_NAME,cp.MARKING_PERIOD_ID,cp.DAYS,sp.SORT_ORDER,c.TITLE AS COURSE_TITLE FROM COURSE_PERIODS cp, SCHOOL_PERIODS sp,COURSES c WHERE c.COURSE_ID=cp.COURSE_ID AND cp.PERIOD_ID=sp.PERIOD_ID AND cp.SYEAR='" . UserSyear() . "' AND cp.SCHOOL_ID='" . UserSchool() . "' AND (cp.TEACHER_ID='" . UserStaffID() . "' OR cp.SECONDARY_TEACHER_ID='" . UserStaffID() . "') ORDER BY sp.SORT_ORDER ");
$RET = DBGet($QI);
// get the fy marking period id, there should be exactly one fy marking period
$fy_id = DBGet(DBQuery("SELECT MARKING_PERIOD_ID FROM SCHOOL_YEARS WHERE SYEAR='" . UserSyear() . "' AND SCHOOL_ID='" . UserSchool() . "'"));
$fy_id = $fy_id[1]['MARKING_PERIOD_ID'];
if (isset($cp_id)) {
$_REQUEST['period'] = $cp_id;
}
if ($_REQUEST['period']) {