本文整理汇总了PHP中main_front_class::redirect方法的典型用法代码示例。如果您正苦于以下问题:PHP main_front_class::redirect方法的具体用法?PHP main_front_class::redirect怎么用?PHP main_front_class::redirect使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类main_front_class
的用法示例。
在下文中一共展示了main_front_class::redirect方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1:
<?php
session_start();
require_once "main_includes/main_class.php";
$obj = new main_front_class();
if (!isset($_SESSION['rb_uname']) || !isset($_SESSION['rb_pass']) || !isset($_SESSION['rb_pin']) || !isset($_SESSION['rb_power'])) {
$obj->redirect("index.php");
} else {
$result_login = $obj->LoginData($_SESSION['rb_power'], $_SESSION['rb_uname']);
}
$tender_details = $obj->common_fetchdata('tender', $_GET['id']);
$purchaser_detail = $obj->common_fetchdata('create_purchaser', $tender_details['tender_purchaser']);
//$main_consignee = $obj->List_Consignee_on_Purchaser($tender_details['tender_purchaser']);
$main_consignee = $obj->List_Drop_Down("consignee", "csign_short_name", "id");
$tender_status = $obj->Tender_status($tender_details['status']);
if ($tender_details['tender_type'] == 0) {
$status = 'Advertise';
}
if ($tender_details['tender_type'] == 1) {
$status = 'Limited';
}
if ($tender_details['tender_type'] == 2) {
$status = 'Bulletin';
}
if ($tender_details['tender_type'] == 3) {
$status = 'SPL Limited';
}
if ($tender_details['tender_type'] == 4) {
$status = 'Local Purchaser';
}
$product_details = $obj->attach_records_products($_GET['id'], 'tender_firm_product', 'tender_id');
开发者ID:kalpishs,项目名称:tender_managment,代码行数:31,代码来源:tender_quot_new+(discovered-PC's+conflicted+copy+2013-05-05).php
示例2:
<?php
session_start();
error_reporting(0);
require_once "main_includes/main_class.php";
$obj = new main_front_class();
if (!isset($_SESSION['rb_uname']) || !isset($_SESSION['rb_pass']) || !isset($_SESSION['rb_pin']) || !isset($_SESSION['rb_power'])) {
$obj->redirect("index.php");
} else {
$result_login = $obj->LoginData($_SESSION['rb_power'], $_SESSION['rb_uname']);
}
//$result = $obj->common_update_allcolm('employee','created_by','updated_by');
$AllPurchaser = $obj->List_Drop_Down('office', 'office_code', 'id');
if (isset($_GET['pid']) && $_GET['pid'] != "") {
$result = $obj->common_update_allcolm2_order_by_short_on_Office('employee', 'created_by', 'created_table', 'updated_by', 'updated_table', 'employee_first_name', $_GET['pid'], 'employee_office');
}
//$result = $obj->common_update_allcolm2_order_by_short('employee','created_by','created_table','updated_by','updated_table','employee_first_name');
$_SESSION['key'] = mt_rand(1, 1000);
?>
<!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">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script type="text/javascript" src="main_includes/add_new_row.js"></script>
<link rel="stylesheet" href="main_css/main_css.css"/>
<link href='http://fonts.googleapis.com/css?family=Open+Sans:400,600' rel='stylesheet' type='text/css'>
<title>Update Employee : Rainbow Tender Managment</title>
<link rel="stylesheet" type="text/css" media="screen" href="main_css/jquery.ui.potato.menu.css" />
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script type="text/javascript" src="main_js/menu_bar/jquery.ui.potato.menu.js"></script>
开发者ID:kalpishs,项目名称:tender_managment,代码行数:30,代码来源:employee_update+(discovered-PC's+conflicted+copy+2013-05-05).php
示例3: explode
<?php
session_start();
require_once "main_includes/main_class.php";
$obj = new main_front_class();
if (!isset($_SESSION['rb_uname']) || !isset($_SESSION['rb_pass']) || !isset($_SESSION['rb_pin']) || !isset($_SESSION['rb_power'])) {
$obj->redirect("index.php");
} else {
$result_login = $obj->LoginData($_SESSION['rb_power'], $_SESSION['rb_uname']);
}
if (isset($_GET['val']) && $_GET['val'] != "") {
$result = $obj->common_fetchdata('history_tender', $_GET['val']);
$corect_date_format = explode("-", $result['tender_due_date']);
$final_date = $corect_date_format[2] . '-' . $corect_date_format[1] . '-' . $corect_date_format[0];
$result_product = $obj->common_fetch_attachement_withItem_His('history_po_firm_product', 'tender_id', $_GET['val']);
$result_attachment = $obj->common_fetch_attachement('history_tender_attachments', 'tender_id', $_GET['val']);
//$result_limited_firms = $obj->common_fetch_attachement_limited_firm('tender_limited_firm','tender_id',$_GET['val']);
$tender_office = $obj->Common_name_id('office', 'office_name', $result['tender_office']);
$tender_purchaser = $obj->Common_name_id('create_purchaser', 'purchaser_short_name', $result['tender_purchaser']);
$list_consignee_edit = $obj->List_Drop_down_onSelection_noAjax('main_consignee', 'main_csign_short_name', 'main_csign_purchaser', $result['tender_purchaser']);
}
$list_office = $obj->List_Drop_Down("office", "office_name", "id");
$list_firm = $obj->List_Drop_Down("consignee", "csign_short_name", "id");
//print_r($list_firm);
//tere liye
?>
<script type="text/javascript">
//tere liye check
<?php
$tlf_str = "var tere_liye_firms_list = [";
示例4: array
<?php
session_start();
require_once "main_includes/main_class.php";
$obj = new main_front_class();
if (!isset($_SESSION['rb_uname']) || !isset($_SESSION['rb_pass']) || !isset($_SESSION['rb_pin']) || !isset($_SESSION['rb_power'])) {
$obj->redirect("index.php");
} else {
$result_login = $obj->LoginData($_SESSION['rb_power'], $_SESSION['rb_uname']);
}
if (isset($_GET['val']) == 1 && $_GET['val'] != "") {
$result = $obj->common_fetchdata('item_manager', $_GET['val']);
}
if (isset($_POST['submit']) && $_POST['key'] == $_SESSION['key']) {
/*$finalName = array();
$name = array();
for($i=0;$i<sizeof($_POST['titles']);$i++)
{
if($_POST['titles'][$i]!="")
{
if($_FILES['files']['name'][$i]!="")
{
$name[$i] = $_FILES['files']['name'][$i];
$tmp_name = $_FILES['files']['tmp_name'][$i];
$ext = $obj->getExtension($name[$i]);
$newName = $obj->nameGen();
$finalName[$i] = $newName.".".$ext;
move_uploaded_file($tmp_name,"attachements/items_attach/". $finalName[$i]);
}
else
{
示例5:
if ($_POST['rb_power'] == "") {
$msg = "Please select role to login";
} else {
if ($_POST['rb_uname'] == '' || $_POST['rb_pass'] == '' || $_POST['rb_pin'] == '') {
$msg = "Incomplete login info";
} else {
$result = $obj->login($_POST['rb_uname'], $_POST['rb_pass'], $_POST['rb_power'], $_POST['rb_pin']);
if ($result) {
//session_register("rb_uname","rb_pass","rb_pin");
$_SESSION['rb_uname'] = $_POST['rb_uname'];
$_SESSION['rb_pass'] = $_POST['rb_pass'];
$_SESSION['rb_pin'] = $_POST['rb_pin'];
$_SESSION['rb_power'] = $_POST['rb_power'];
$_SESSION['pin_table'] = $result[0];
$_SESSION['pin_id'] = $result[1];
$obj->redirect("demo.php");
} else {
$msg = "Incorrect login info";
}
}
}
}
?>
<!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">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" href="main_css/main_css.css"/>
<link href='http://fonts.googleapis.com/css?family=Open+Sans:400,600' rel='stylesheet' type='text/css'>
<style type="text/css">
示例6: array
<?php
session_start();
require_once "main_includes/main_class.php";
$obj = new main_front_class();
if (!isset($_SESSION['rb_uname']) || !isset($_SESSION['rb_pass']) || !isset($_SESSION['rb_pin']) || !isset($_SESSION['rb_power'])) {
$obj->redirect("index.php");
} else {
$result_login = $obj->LoginData($_SESSION['rb_power'], $_SESSION['rb_uname']);
}
if (isset($_GET['val']) && $_GET['val'] != "") {
$result = $obj->common_fetchdata('tender', $_GET['val']);
$result_product = $obj->common_fetch_attachement_withItem('tender_firm_product', 'tender_id', $_GET['val']);
$result_attachment = $obj->common_fetch_attachement('tender_attachments', 'tender_id', $_GET['val']);
$tender_office = $obj->Common_name_id('office', 'office_name', $result['tender_office']);
$tender_purchaser = $obj->Common_name_id('create_purchaser', 'purchaser_short_name', $result['tender_purchaser']);
$list_consignee_edit = $obj->List_Drop_down_onSelection_noAjax('main_consignee', 'main_csign_short_name', 'main_csign_purchaser', $result['tender_purchaser']);
}
$list_office = $obj->List_Drop_Down("office", "office_name", "id");
$list_purchaser = $obj->List_Drop_Down("create_purchaser", "purchaser_short_name", "id");
if (isset($_POST['submit']) && $_POST['key'] == $_SESSION['key']) {
$finalName = array();
$name = array();
for ($i = 0; $i < sizeof($_POST['titles']); $i++) {
$name[$i] = $_FILES['files']['name'][$i];
$tmp_name = $_FILES['files']['tmp_name'][$i];
$ext = $obj->getExtension($name[$i]);
$newName = $obj->nameGen();
$finalName[$i] = $newName . "." . $ext;
move_uploaded_file($tmp_name, "attachements/tender_attach/" . $finalName[$i]);
}
示例7: array
<?php
session_start();
require_once "main_includes/main_class.php";
$obj = new main_front_class();
if (!isset($_SESSION['rb_uname']) || !isset($_SESSION['rb_pass']) || !isset($_SESSION['rb_pin']) || !isset($_SESSION['rb_power'])) {
$obj->redirect("index.php");
} else {
$result_login = $obj->LoginData($_SESSION['rb_power'], $_SESSION['rb_uname']);
}
if (isset($_GET['val']) && $_GET['val'] != "") {
$result = $obj->common_fetchdata('office', $_GET['val']);
$result_attachment = $obj->common_fetch_attachement('office_attachments', 'office_id', $_GET['val']);
}
if (isset($_POST['submit'])) {
//----ATTACHEMENTS-------
/* $finalName = array();
$name = array();
for($i=0;$i<sizeof($_POST['titles']);$i++)
{
$name[$i] = $_FILES['files']['name'][$i];
$tmp_name = $_FILES['files']['tmp_name'][$i];
$ext = $obj->getExtension($name[$i]);
$newName = $obj->nameGen();
$finalName[$i] = $newName.".".$ext;
move_uploaded_file($tmp_name,"attachements/office_attach/".$finalName[$i]);
}*/
//----ATTACHEMENTS_END-----
if (isset($_GET['val']) == 1 && $_GET['val'] != "") {
$update_result = $obj->office_update($_GET['val'], $_POST['office_code'], $_POST['office_name'], $_POST['office_address'], $_POST['office_city'], $_POST['office_pin'], $_POST['office_telephone'], $_POST['office_fax'], $_POST['office_contact_person'], $_POST['office_mobile'], $_POST['office_email'], $_SESSION['pin_id'], $_SESSION['pin_table']);
if ($update_result == 1) {
示例8: SimpleImage
<?php
session_start();
include "main_includes/main_class.php";
$obj = new main_front_class();
if (!isset($_SESSION['rb_uname']) || !isset($_SESSION['rb_pass']) || !isset($_SESSION['rb_pin']) || !isset($_SESSION['rb_power'])) {
$obj->redirect("index.php");
} else {
$result_login = $obj->LoginData($_SESSION['rb_power'], $_SESSION['rb_uname']);
}
$list_Office = $obj->List_Drop_Down("office", "office_code", "id");
if (isset($_GET['val']) && $_GET['val'] != "") {
$result = $obj->common_fetchdata('officer', $_GET['val']);
$office_name_id = $obj->Common_name_id('office', 'office_code', $result['officer_office']);
$result_attachment = $obj->common_fetch_attachement('officer_attachments', 'officer_id', $_GET['val']);
}
include "main_includes/simpleimage.php";
$thumb = new SimpleImage();
if (isset($_POST['submit']) && $_POST['key'] == $_SESSION['key']) {
//----PIC UPLAOD------------------------
if ($_FILES['officer_photo']['name'] != "") {
//explode()---break a string in to array
$alloweExts = array("jpg", "jpeg", "gif", "png");
$extension = end(explode(".", $_FILES['officer_photo']['name']));
if ($_FILES['officer_photo']['type'] == "image/jpg" || $_FILES['officer_photo']['type'] == "image/jpeg" || $_FILES['officer_photo']['type'] == "image/gif" || $_FILES['officer_photo']['type'] == "image/png" || $_FILES['officer_photo']['size'] != 0 && in_array($extension, $alloweExts)) {
$img_orig_name = $_FILES['officer_photo']['name'];
$img_new_name = $obj->nameGen();
$img_extn = $obj->getExtension($img_orig_name);
$img_final_name = $img_new_name . "." . $img_extn;
move_uploaded_file($_FILES['officer_photo']['tmp_name'], "photo/officer/main/" . $img_final_name);
$thumb->load("photo/officer/main/" . $img_final_name);
开发者ID:kalpishs,项目名称:tender_managment,代码行数:31,代码来源:create_officer+(discovered-PC's+conflicted+copy+2013-05-05).php
示例9:
<?php
session_start();
require_once "main_includes/main_class.php";
$obj = new main_front_class();
if (!isset($_SESSION['rb_uname']) || !isset($_SESSION['rb_pass']) || !isset($_SESSION['rb_pin']) || !isset($_SESSION['rb_power'])) {
$obj->redirect("index.php");
} else {
$result_login = $obj->LoginData($_SESSION['rb_power'], $_SESSION['rb_uname']);
}
$list_office = $obj->List_Drop_Down("office", "office_name", "id");
$list_purchaser = $obj->List_Drop_Down("create_purchaser", "purchaser_short_name", "id");
//if(isset($_GET['hv']) && $_GET['hv']!="")
if (isset($_POST['submit_status'])) {
$obj->ChangeTenderStatus($_POST['hide_tender_id_status'], $_POST['radio_select']);
}
if (isset($_POST['submit_status_firm'])) {
$obj->ChangeTenderFirmStatus($_POST['hide_tender_id_status_firm'], $_POST['radio_select_firm']);
}
if (isset($_POST['submit'])) {
$OT = $_POST['tender_office'];
$PT = $_POST['tender_purchaser'];
$ST = $_POST['tender_status'];
$obj->redirect('tender_list.php?ot=' . $OT . '&pt=' . $PT . '&st=' . $ST);
$tp = $obj->TotalPage($_GET['ot'], $_GET['pt'], $_GET['st']);
} else {
if (isset($_GET['page']) || isset($_GET['ot'])) {
$OT = $_GET['ot'];
$PT = $_GET['pt'];
$ST = $_GET['st'];
$tp = $obj->TotalPage($OT, $PT, $ST);
开发者ID:kalpishs,项目名称:tender_managment,代码行数:31,代码来源:tender_list+(discovered-PC's+conflicted+copy+2013-05-05).php
示例10: SimpleImage
<?php
session_start();
include "main_includes/main_class.php";
$obj = new main_front_class();
if (!isset($_SESSION['rb_uname']) || !isset($_SESSION['rb_pass']) || !isset($_SESSION['rb_pin']) || !isset($_SESSION['rb_power'])) {
$obj->redirect("index.php");
} else {
$result_login = $obj->LoginData($_SESSION['rb_power'], $_SESSION['rb_uname']);
}
//$list_Office = $obj->List_Drop_Down("office","office_code","id");
if (isset($_GET['val']) && $_GET['val'] != "") {
$result = $obj->common_fetchdata('specification', $_GET['val']);
//$office_name_id = $obj->Common_name_id('office','office_code',$result['officer_office']);
$result_attachment = $obj->common_fetch_attachement('specification_attachements', 'specs_id', $_GET['val']);
}
include "main_includes/simpleimage.php";
$thumb = new SimpleImage();
if (isset($_POST['submit']) && $_POST['key'] == $_SESSION['key']) {
//----ATTACHEMENTS-------
$finalName = array();
$name = array();
$counterXD = 0;
for ($i = 0; $i < sizeof($_FILES['files']['name']); $i++) {
if ($_FILES['files']['name'][$i] == '') {
$counterXD++;
}
$name[$i] = $_FILES['files']['name'][$i];
$tmp_name = $_FILES['files']['tmp_name'][$i];
$ext = $obj->getExtension($name[$i]);
$newName = $obj->nameGen();
开发者ID:kalpishs,项目名称:tender_managment,代码行数:31,代码来源:add_specs+(discovered-PC's+conflicted+copy+2013-05-05).php
示例11: SimpleImage
<?php
session_start();
require_once "main_includes/main_class.php";
$obj = new main_front_class();
if (!isset($_SESSION['rb_uname']) || !isset($_SESSION['rb_pass']) || !isset($_SESSION['rb_pin']) || !isset($_SESSION['rb_power'])) {
$obj->redirect("index.php");
} else {
$result_login = $obj->LoginData($_SESSION['rb_power'], $_SESSION['rb_uname']);
}
$list_Office = $obj->List_Drop_Down("office", "office_code", "id");
if (isset($_GET['val']) && $_GET['val'] != "") {
$result = $obj->common_fetchdata('employee', $_GET['val']);
$office_name_id = $obj->Common_name_id('office', 'office_code', $result['employee_office']);
$result_attachment = $obj->common_fetch_attachement('employee_attachments', 'employee_id', $_GET['val']);
}
include "main_includes/simpleimage.php";
$thumb = new SimpleImage();
if (isset($_POST['submit']) && $_POST['key'] == $_SESSION['key']) {
//---------PIC UPLOAD-----------
if ($_FILES['employee_photo']['name'] != "") {
$alloweExts = array("jpg", "jpeg", "gif", "png");
$extension = end(explode(".", $_FILES['employee_photo']['name']));
if ($_FILES['employee_photo']['type'] == "image/jpg" || $_FILES['employee_photo']['type'] == "image/jpeg" || $_FILES['employee_photo']['type'] == "image/gif" || $_FILES['employee_photo']['type'] == "image/png" || $_FILES['employee_photo']['size'] != 0 && in_array($extension, $alloweExts)) {
$img_orig_name = $_FILES['employee_photo']['name'];
$img_new_name = $obj->nameGen();
$img_extn = $obj->getExtension($img_orig_name);
$img_final_name = $img_new_name . "." . $img_extn;
move_uploaded_file($_FILES['employee_photo']['tmp_name'], "photo/employee/main/" . $img_final_name);
$thumb->load("photo/employee/main/" . $img_final_name);
$thumb->resize(190, 180);
开发者ID:kalpishs,项目名称:tender_managment,代码行数:31,代码来源:create_employee+(discovered-PC's+conflicted+copy+2013-05-05).php
示例12: explode
<?php
session_start();
require_once "main_includes/main_class.php";
$obj = new main_front_class();
if (!isset($_SESSION['rb_uname']) || !isset($_SESSION['rb_pass']) || !isset($_SESSION['rb_pin']) || !isset($_SESSION['rb_power'])) {
$obj->redirect("index.php");
} else {
$result_login = $obj->LoginData($_SESSION['rb_power'], $_SESSION['rb_uname']);
}
if (isset($_GET['val']) && $_GET['val'] != "") {
$result = $obj->common_fetchdata('po', $_GET['val']);
if ($result['tender_type'] == 1) {
$firm_list_edit_time = $obj->List_All_Firms_In_Po_Section_In_we_have_tender_id_No_Ajax($result['tender_id']);
} else {
$firm_list_edit_time = $obj->List_Drop_Down('consignee', 'csign_short_name', 'id');
}
if ($result['due_date'] != '0000-00-00') {
$corect_date_format = explode("-", $result['due_date']);
$due_date = $corect_date_format[2] . '/' . $corect_date_format[1] . '/' . $corect_date_format[0];
} else {
$due_date = '';
}
if ($result['refi_date'] != '0000-00-00') {
$corect_date_format2 = explode("-", $result['refi_date']);
$refi_date = $corect_date_format2[2] . '/' . $corect_date_format2[1] . '/' . $corect_date_format2[0];
} else {
$refi_date = '';
}
if ($result['extended_date'] != '0000-00-00') {
$corect_date_format3 = explode("-", $result['extended_date']);
示例13: array
<?php
session_start();
require_once "main_includes/main_class.php";
$obj = new main_front_class();
if (!isset($_SESSION['rb_uname']) || !isset($_SESSION['rb_pass']) || !isset($_SESSION['rb_pin']) || !isset($_SESSION['rb_power'])) {
$obj->redirect("index.php");
} else {
$result_login = $obj->LoginData($_SESSION['rb_power'], $_SESSION['rb_uname']);
}
$list_purchaser = $obj->List_Drop_Down("create_purchaser", "purchaser_short_name", "id");
if (isset($_GET['val']) && $_GET['val'] != "") {
$result = $obj->common_fetchdata('main_consignee', $_GET['val']);
$purchaser_name = $obj->Common_name_id('create_purchaser', 'purchaser_short_name', $result['main_csign_purchaser']);
$result_director = $obj->common_fetch_attachement('main_consignee_contacts', 'main_csign_id', $_GET['val']);
$result_attachment = $obj->common_fetch_attachement('main_csign_attachments', 'main_csign_id', $_GET['val']);
}
if (isset($_POST['submit']) && $_POST['key'] == $_SESSION['key']) {
/*$finalName = array();
$name = array();
for($i=0;$i<sizeof($_POST['titles']);$i++)
{
$name[$i] = $_FILES['files']['name'][$i];
$tmp_name = $_FILES['files']['tmp_name'][$i];
$ext = $obj->getExtension($name[$i]);
$newName = $obj->nameGen();
$finalName[$i] = $newName.".".$ext;
move_uploaded_file($tmp_name,"attachements/main_csign_attach/".$finalName[$i]);
}*/
if (isset($_GET['val']) & $_GET['val'] != "") {
$update_result = $obj->main_consignee_update($_POST, $finalName, $name, $result['id'], $_SESSION['pin_id'], $_SESSION['pin_table']);
示例14:
<?php
session_start();
include "main_includes/main_class.php";
$obj = new main_front_class();
if (!isset($_SESSION['rb_uname']) || !isset($_SESSION['rb_pass']) || !isset($_SESSION['rb_pin']) || !isset($_SESSION['rb_power'])) {
$obj->redirect("index.php");
} else {
$result_login = $obj->LoginData($_SESSION['rb_power'], $_SESSION['rb_uname']);
}
$list_Office = $obj->List_Drop_Down("office", "office_name", "id");
if (isset($_GET['val']) && $_GET['val'] != "") {
$result = $obj->common_fetchdata_FETCH_ARRAY($_GET['p'], $_GET['val']);
//print_r($result);
$colm = $_GET['p'] . "_office";
$office_name_id = $obj->Common_name_id('office', 'office_name', $result[$colm]);
}
if (isset($_POST['submit'])) {
$obj->redirect($_GET['a']);
}
?>
<!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">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script type="text/javascript" src="main_includes/add_new_row.js"></script>
<link rel="stylesheet" href="main_css/main_css.css"/>
<link href='http://fonts.googleapis.com/css?family=Open+Sans:400,600' rel='stylesheet' type='text/css'>
<style type="text/css">
示例15: array
<?php
session_start();
require_once "main_includes/main_class.php";
$obj = new main_front_class();
if (!isset($_SESSION['rb_uname']) || !isset($_SESSION['rb_pass']) || !isset($_SESSION['rb_pin']) || !isset($_SESSION['rb_power'])) {
$obj->redirect("index.php");
} else {
$result_login = $obj->LoginData($_SESSION['rb_power'], $_SESSION['rb_uname']);
}
if (isset($_GET['val']) == 1 && $_GET['val'] != "") {
$result = $obj->common_fetchdata('create_purchaser', $_GET['val']);
$result_director = $obj->common_fetch_attachement('purchaser_director', 'purchase_id', $_GET['val']);
$result_attachment = $obj->common_fetch_attachement('purchase_attachments', 'purchase_id', $_GET['val']);
}
if (isset($_POST['submit']) && $_POST['key'] == $_SESSION['key']) {
$finalName = array();
$name = array();
for ($i = 0; $i < sizeof($_POST['titles']); $i++) {
$name[$i] = $_FILES['files']['name'][$i];
$tmp_name = $_FILES['files']['tmp_name'][$i];
$ext = $obj->getExtension($name[$i]);
$newName = $obj->nameGen();
$finalName[$i] = $newName . "." . $ext;
move_uploaded_file($tmp_name, "attachements/purchaser_attach/" . $finalName[$i]);
}
if (isset($_GET['val']) == 1 && $_GET['val'] != "") {
$update_purchaser = $obj->purchase_update($_POST, $finalName, $name, $result['id'], $_SESSION['pin_id'], $_SESSION['pin_table']);
if ($update_purchaser == 1) {
$obj->ALertMessage("Purchaser Updated Successfully", $update_purchaser);
$obj->redirect("purchaser_update.php");