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}&nbsp;{rows}</td></tr>\n<tr><td colspan=2 align=right><input type=submit value='{search}&nbsp;&raquo'></td></tr>\n<tr><td colspan=2 class=legend>{for}:&nbsp;" . implode(", ", $user->HASH_ALL_MAILS) . "</td></tr>\n</table>") . "\n</center>\n</form>\n</td>\n</tr>\n</table>\n\n\n<p>&nbsp;</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;
}
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");
        }
    }
}
 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>';
Exemple #4
0
            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>';
Exemple #5
0
<?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']);
    //	{
    //            $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);
}
    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');
    }
#  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 = '';
        }
    }
}
<?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();
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);
}
Exemple #11
0
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;
            }
        }
        $where = "(" . $adv_string . ")#@@#" . $url_string . "&searchtype=advance&search_cnt=" . $tot_no_criteria . "&matchtype=" . vtlib_purify($_REQUEST['matchtype']);
    } elseif ($_REQUEST['type'] == 'dbrd') {
        $where = getdashboardcondition();
    } else {
        $where = Search($currentModule);
    }
    $log->debug("Exiting getWhereCondition method ...");
    return $where;
}
Exemple #12
0
            //                    DrawHeaderHome( 'Selected User: '******'FIRST_NAME'].'&nbsp;'.$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: '******'FIRST_NAME'] . '&nbsp;' . $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."'
Exemple #13
0
            $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;
		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>
#***************************************************************************************
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']) {
Exemple #16
0
echo $numpostvars;
?>
] items. PHP will truncate the number of items to its limit with no warning. To prevent you from receiving less data than you are expecting, this page will not process your download request. Please go back to the search page and download less than [<?php 
echo $maxnumvars;
?>
] data items.</div>
		<?
		exit(0);
	}
	
	/* ----- determine which action to take ----- */
	switch ($action) {
		case 'searchform': DisplaySearchForm($searchvars, $action); break;
		case 'search':
			DisplaySearchForm($searchvars, $action);
			Search($searchvars);
			break;
		case 'submit': ProcessRequest($requestvars, $username); break;
		case 'anonymize': Anonymize($requestvars, $username); break;
		default:
			DisplaySearchForm($searchvars, $action);
	}

	
	/* -------------------------------------------- */
	/* ------- DisplaySearchForm ------------------ */
	/* -------------------------------------------- */
	function DisplaySearchForm($searchvars, $action) {
	
		$urllist['New Search'] = "search.php";
		NavigationBar("Search", $urllist);
Exemple #17
0
    <option value="913">Капли и сиропы</option>
    <option value="914">Активные компоненты</option>
    <option value="915">Специальные предложения</option>
  </optgroup>
  
</select>
				<p></p>
				<button type="submit" class="btn btn-primary">Найти</button> 
				<button class="btn btn-primary" value="<?php 
echo $_SERVER['PHP_SELF'];
?>
">Сбросить</button>
	
			</form>
		</div>
		<? $s = Search();?>
	</div>
              <? if(!empty($_POST['postavchiki']) || !empty($_POST['name']) ){  ?>
			<div class="alert alert-success">
			Поиск по
			<?if(empty($_POST['postavchiki'])){}else{?>
				<?php 
echo "поставщику: " . $_POST['postavchiki'] . ";";
?>
			<?}?>
			<?if(empty($_POST['sections'])){}else{?>
				<?php 
echo ">разделу: " . $_POST['sections'] . ";";
?>
			<?}?>
			<?if(empty($_POST['name'])){}else{?>
Exemple #18
0
#  See license.txt.
#
#  This program is distributed in the hope that it will be useful,
#  but WITHOUT ANY WARRANTY; without even the implied warranty of
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#  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';
DrawBC(_('Users') . " > " . ProgramTitle());
include 'Menu.php';
if (!UserStaffID()) {
    Search('staff_id');
}
//else
//{
//	$profile = DBGet(DBQuery("SELECT PROFILE FROM staff WHERE STAFF_ID='".UserStaffID()."'"));
//	if(!$profile[1]['PROFILE'] || $profile[1]['PROFILE']=='none')
//	{
//		unset($_SESSION['staff_id']);
//		echo '<script language=JavaScript>parent.side.location="'.$_SESSION['Side_PHP_SELF'].'?modcat="+parent.side.document.forms[0].modcat.value;
//		Search('staff_id');
//	}
//}
$user_id = UserStaffID();
$profile = DBGet(DBQuery('SELECT PROFILE FROM staff WHERE STAFF_ID=\'' . $user_id . '\''));
$xprofile = $profile[1]['PROFILE'];
$exceptions_RET = DBGet(DBQuery('SELECT MODNAME,CAN_USE,CAN_EDIT FROM staff_exceptions WHERE USER_ID=\'' . $user_id . '\''), array(), array('MODNAME'));
Exemple #19
0
             unset($_REQUEST['values']);
         }
         unset($_SESSION['_REQUEST_vars']['modfunc']);
         unset($_SESSION['_REQUEST_vars']['values']);
     }
 }
 if ($flag != true) {
     if ($err) {
         echo '<center><font color=red><b>' . $err . '</b></font></center>';
     }
     if ($_REQUEST['student_id'] == 'new') {
         DrawBC('Students > Add a Student');
     } else {
         DrawBC("Students > " . ProgramTitle());
     }
     Search('student_id_from_student');
     if ($_REQUEST['stuid']) {
         $select .= " AND ssm.STUDENT_ID = '" . str_replace("'", "\\'", $_REQUEST[stuid]) . "' ";
     }
     if ($_REQUEST['altid']) {
         $select .= " AND s.ALT_ID = '" . str_replace("'", "\\'", $_REQUEST[altid]) . "' ";
     }
     if ($_REQUEST['last']) {
         $select .= " AND LOWER(s.LAST_NAME) LIKE '" . str_replace("'", "\\'", strtolower(trim($_REQUEST['last']))) . "%' ";
     }
     if ($_REQUEST['first']) {
         $select .= " AND LOWER(s.FIRST_NAME) LIKE '" . str_replace("'", "\\'", strtolower(trim($_REQUEST['first']))) . "%' ";
     }
     if ($_REQUEST['grade']) {
         $select .= " AND ssm.GRADE_ID IN(SELECT id FROM school_gradelevels WHERE title= '" . str_replace("'", "\\'", $_REQUEST[grade]) . "') ";
     }
function getWhereCondition($currentModule, $input = '')
{
    global $log, $default_charset, $adb;
    global $column_array, $table_col_array, $mod_strings, $current_user;
    $log->debug("Entering getWhereCondition(" . $currentModule . ") method ...");
    if (empty($input)) {
        $input = $_REQUEST;
    }
    if ($input['searchtype'] == 'advance') {
        $json = new Zend_Json();
        $advft_criteria = $input['advft_criteria'];
        if (!empty($advft_criteria)) {
            $advft_criteria_decoded = $json->decode($advft_criteria);
        }
        $advft_criteria_groups = $input['advft_criteria_groups'];
        if (!empty($advft_criteria_groups)) {
            $advft_criteria_groups_decoded = $json->decode($advft_criteria_groups);
        }
        $advfilterlist = getAdvancedSearchCriteriaList($advft_criteria_decoded, $advft_criteria_groups_decoded, $currentModule);
        $adv_string = generateAdvancedSearchSql($advfilterlist);
        if (!empty($adv_string)) {
            $adv_string = '(' . $adv_string . ')';
        }
        $where = $adv_string . '#@@#' . '&advft_criteria=' . $advft_criteria . '&advft_criteria_groups=' . $advft_criteria_groups . '&searchtype=advance';
    } elseif ($input['type'] == 'dbrd') {
        $where = getdashboardcondition($input);
    } else {
        $where = Search($currentModule, $input);
    }
    $log->debug("Exiting getWhereCondition method ...");
    return $where;
}
Exemple #21
0
function getWhereCondition($currentModule)
{
    global $log;
    $column_array = getColumnOrTableArr();
    $table_col_array = getColumnOrTableArr(false);
    $log->debug("Entering getWhereCondition(" . $currentModule . ") method ...");
    if ($_REQUEST['searchtype'] != 'advance') {
        $where = Search($currentModule);
    } else {
        $adv_string = '';
        $url_string = '';
        if (isset($_REQUEST['search_cnt'])) {
            $tot_no_criteria = $_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;
            $tab_col = '';
            $tab_col = str_replace('\'', '', stripslashes($_REQUEST[$table_colname]));
            $tab_col = str_replace('\\', '', $tab_col);
            $srch_cond = str_replace('\'', '', stripslashes($_REQUEST[$search_condition]));
            $srch_cond = str_replace('\\', '', $srch_cond);
            $srch_val = $_REQUEST[$search_value];
            list($tab_name, $column_name) = split("[.]", $tab_col);
            $url_string .= "&Fields" . $i . "=" . $tab_col . "&Condition" . $i . "=" . $srch_cond . "&Srch_value" . $i . "=" . $srch_val;
            if ($tab_col == "smownerid") {
                $adv_string .= getSearch_criteria($srch_cond, $srch_val, 'ec_users.user_name') . $matchtype;
            } elseif ($tab_col == "smcreatorid") {
                $user_id = getUserId_Ol($srch_val);
                $adv_string .= " smcreatorid='" . $user_id . "' " . $matchtype;
            } elseif ($tab_col == "approvedby") {
                $user_id = getUserId_Ol($srch_val);
                $adv_string .= " approvedby='" . $user_id . "' " . $matchtype;
            } elseif ($tab_col == "approved") {
                $srch_val = getApproveIdByStatus($srch_val);
                $adv_string .= " approved='" . $srch_val . "' " . $matchtype;
            } elseif ($tab_col == "ec_activity.status") {
                $adv_string .= " (" . getSearch_criteria($srch_cond, $srch_val, 'ec_activity.status') . " or";
                $adv_string .= " " . getSearch_criteria($srch_cond, $srch_val, 'ec_activity.eventstatus') . " )" . $matchtype;
            } elseif ($tab_col == "ec_cntactivityrel.contactid") {
                $adv_string .= " (" . getSearch_criteria($srch_cond, $srch_val, 'ec_contactdetails.firstname') . " or";
                $adv_string .= " " . getSearch_criteria($srch_cond, $srch_val, 'ec_contactdetails.lastname') . " )" . $matchtype;
            } elseif ($tab_col == "ec_products.catalogid") {
                $adv_string .= getSearch_criteria($srch_cond, $srch_val, 'ec_catalog.catalogname') . " " . $matchtype;
            } elseif ($tab_col == "ec_faq.faqcategoryid") {
                $adv_string .= getSearch_criteria($srch_cond, $srch_val, 'ec_faqcategory.faqcategoryname') . " " . $matchtype;
            } elseif (in_array($column_name, $column_array)) {
                $adv_string .= getValuesforColumns($column_name, $srch_val) . " " . $matchtype;
            } else {
                $adv_string .= " " . getSearch_criteria($srch_cond, $srch_val, $tab_col) . " " . $matchtype;
            }
        }
        $where = "(" . $adv_string . ")#@@#" . $url_string . "&searchtype=advance&search_cnt=" . $tot_no_criteria . "&matchtype=" . $_REQUEST['matchtype'];
    }
    /*
    elseif($_REQUEST['type']=='dbrd')
    {
    	$where = getdashboardcondition();
    }
    
    else
    {
     		$where=Search($currentModule);
    }
    */
    $log->info("getWhereCondition method where condition:" . $where);
    $log->debug("Exiting getWhereCondition method ...");
    return $where;
}
Exemple #22
0
 case 'teacher':
     echo '<BR>';
     $_SESSION['Search_PHP_SELF'] = PreparePHP_SELF($_SESSION['_REQUEST_vars']);
     echo '<script language=JavaScript>parent.help.location.reload();</script>';
     PopTable('header', 'Find a Student');
     if ($extra['pdf'] != true) {
         echo "<FORM name=search id=search action=Modules.php?modname={$_REQUEST['modname']}&modfunc={$_REQUEST['modfunc']}&search_modfunc=list&next_modname={$_REQUEST['next_modname']}" . $extra['action'] . " method=POST>";
     } else {
         echo "<FORM name=search id=search action=for_export.php?modname={$_REQUEST['modname']}&modfunc={$_REQUEST['modfunc']}&search_modfunc=list&next_modname={$_REQUEST['next_modname']}" . $extra['action'] . " method=POST target=_blank>";
     }
     echo '<TABLE border=0>';
     Search('general_info');
     if ($extra['search']) {
         echo $extra['search'];
     }
     Search('student_fields');
     echo '<TABLE width=100%><TR><TD align=center><BR>';
     if (User('PROFILE') == 'admin') {
         echo '<INPUT type=checkbox name=address_group value=Y' . (Preferences('DEFAULT_FAMILIES') == 'Y' ? ' CHECKED' : '') . '>Group by Family<BR>';
         echo '<INPUT type=checkbox name=_search_all_schools value=Y' . (Preferences('DEFAULT_ALL_SCHOOLS') == 'Y' ? ' CHECKED' : '') . '>Search All Schools<BR>';
     }
     echo '<INPUT type=checkbox name=include_inactive value=Y>Include Inactive Students<BR>';
     echo '<BR>';
     //echo Buttons('Submit','Reset');
     if ($extra['pdf'] != true) {
         echo "<INPUT type=SUBMIT class=btn_medium value='Submit' onclick='formload_ajax(\"search\");'>&nbsp<INPUT type=RESET class=btn_medium value='Reset'>";
     } else {
         echo "<INPUT type=SUBMIT class=btn_medium value='Submit'>&nbsp<INPUT type=RESET class=btn_medium value='Reset'>";
     }
     echo '</TD></TR>';
     echo '</TABLE>';
Exemple #23
0
    return;
}
// An optional SortByTitle option can also be specified
if ($_GET["SortByTitle"] == "true") {
    $sortByTitle = true;
}
$keywords = ParseKeywords($searchText);
$letters = array();
$wordDictionary = array();
// Load the file index
$json = file_get_contents("fti/FTI_Files.json");
$fileList = json_decode($json);
// Load the required word index files
foreach ($keywords as $word) {
    $letter = substr($word, 0, 1);
    if (!in_array($letter, $letters)) {
        array_push($letters, $letter);
        $ascii = ord($letter);
        $ftiFile = "fti/FTI_{$ascii}.json";
        if (file_exists($ftiFile)) {
            $json = file_get_contents($ftiFile);
            $ftiWords = json_decode($json, true);
            foreach ($ftiWords as $ftiWord => $val) {
                $wordDictionary[$ftiWord] = $val;
            }
        }
    }
}
// Perform the search and return the results as a block of HTML
$results = Search($keywords, $fileList, $wordDictionary, $sortByTitle);
echo $results;
Exemple #24
0
            //
        } else {
            DrawHeaderHome('Selected User: '******'FIRST_NAME'] . '&nbsp;' . $RET[1]['LAST_NAME'] . ' (<A HREF=Side.php?staff_id=new&modcat=' . $_REQUEST['modcat'] . '><font color=red>Search Again</font></A>)');
        }
    }
}
#############################################
if ($_REQUEST['include'] != 'attendance/MissingAttendance.php') {
    if (!UserStaffID()) {
        Search('teacher_id', 'teachers_option_all');
    } 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_all');
        }
    }
} 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 "));
        if ($block_schedule_check[1]['TOTAL'] != 0) {
            $_REQUEST['period'] = $cp_id;
Exemple #25
0
            $headers["User-Agent"] = getRandomUserAgent();
            $data = $s->GetAudio($bookid, $chapter, $req);
        } else {
            $data = $s->GetAudio($bookid, $chapter, $req);
        }
    }
    $reply["bookid"] = $bookid;
    $reply["chapterid"] = $chapter;
} else {
    if (strlen($keyword) > 0) {
        $servers = GetServers();
        foreach ($servers as $k => $v) {
            if (0 != strcmp("0", $k)) {
                continue;
            }
            $result = Search($v["object"], $keyword);
            foreach ($result as $b) {
                if (strpos($b["book"], "哈利") === false) {
                    $bid = $b["bookid"];
                    $data[] = array("server" => $k, "book" => $b["book"], "bookid" => "{$bid}");
                }
            }
        }
    } else {
        if (0 == strlen($server)) {
            $servers = GetServers();
            foreach ($servers as $k => $v) {
                $data[] = array("id" => "{$k}", "name" => $v["name"]);
            }
        } else {
            $s = GetServerObj($server);
#  This program is distributed in the hope that it will be useful,
#  but WITHOUT ANY WARRANTY; without even the implied warranty of
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#  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';
DrawHeader(ProgramTitle());
Widgets('request');
if (!UserStudentID()) {
    echo '<BR>';
}
Search('student_id', $extra);
if (!$_REQUEST['modfunc'] && UserStudentID()) {
    $_REQUEST['modfunc'] = 'choose';
}
if ($_REQUEST['modfunc'] == 'verify') {
    $QI = DBQuery("SELECT TITLE,COURSE_ID,SUBJECT_ID FROM COURSES WHERE SCHOOL_ID='" . UserSchool() . "' AND SYEAR='" . UserSyear() . "'");
    $courses_RET = DBGet($QI, array(), array('COURSE_ID'));
    //$QI = DBQuery("SELECT COURSE_WEIGHT,COURSE_ID FROM COURSE_WEIGHTS WHERE SCHOOL_ID='".UserSchool()."' AND SYEAR='".UserSyear()."'");
    //$weights_RET = DBGet($QI,array(),array('COURSE_ID','COURSE_WEIGHT'));
    DBQuery("DELETE FROM SCHEDULE_REQUESTS WHERE STUDENT_ID='" . UserStudentID() . "' AND SYEAR='" . UserSyear() . "'");
    foreach ($_REQUEST['courses'] as $subject => $courses) {
        $courses_count = count($courses);
        for ($i = 0; $i < $courses_count; $i++) {
            $course = $courses[$i];
            //$weight = $_REQUEST['course_weights'][$subject][$i];
            if (!$course) {
$timeMEvent = $_POST['minuty'] ;
$placeEvent = $_POST[''];
$kodxEvent = $_POST[''];
$kodyEvent = $_POST[''];
$minEvent = $_POST[''];
$maxEvent = $_POST[''];
$categoryEvent = $_POST[''];
$checkedEvent = $_POST[''];
$organizerEvent = $_POST['organizator'];
$desriptionEvent = $_POST[''];

$rows = array();

if(isset($_POST['submit'])) 
{ 
	Search($rows);
}

function Search($rows)
{
	session_start(); //starting the session for user profile page 
	if(!empty($_POST['nazwa']))
	{	
		$query = mysql_query("SELECT * FROM EVENT") or die(mysql_error());
		$row = mysql_fetch_array($query) or die(mysql_error());
		echo "<table id='koordynaty' style='display:none'>";
		while( $tablez = mysql_fetch_assoc( $query) ) 
		{ 
		$name = $tablez['Name']; 
		$date = $tablez['Date'];
		$hour = $tablez['Hour'];