예제 #1
0
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 = [";
foreach ($list_firm as $tl) {
    $tlf_str .= "['" . $tl['csign_short_name'] . "'," . $tl['id'] . "],";
예제 #2
0
<?php

session_start();
include "main_includes/main_class.php";
$obj = new main_front_class();
if (isset($_GET['PinNumber']) && $_GET['PinNumber'] != "") {
    $result_pop_up = $obj->MsgPopUp($_GET['PinNumber'], $_GET['Table']);
    echo "<span class='response_span'>Name: " . $result_pop_up[0][$result_pop_up[1] . "_first_name"] . "</span><br/>";
    if ($result_pop_up[1] != "admin") {
        $office_name = $obj->Common_name_id('office', 'office_name', $result_pop_up[0][$result_pop_up[1] . "_office"]);
        echo "Office: " . $office_name['office_name'] . "<br/>";
    }
    if ($result_pop_up[1] != 'admin') {
        echo "<a href='profilepage.php?p=" . $result_pop_up[1] . "&val=" . $result_pop_up[0]['id'] . "&a=" . $_GET['url'] . "' class='response' title='" . $result_pop_up[1][1] . "'>View Profile</a>";
        //	http://localhost/tender/create_officer.php?val=16
    }
}
if (isset($_GET['delid']) == 1 && $_GET['delid'] != " " && isset($_GET['tablename']) == 1 && $_GET['tablename'] != " ") {
    $ss = $obj->DelRecord($_GET['delid'], $_GET['tablename'], $_GET['subtable1'], $_GET['subcolmn1'], $_GET['subtable2'], $_GET['subcolmn2']);
    if ($ss == 0) {
        //echo json_encode("yes");
        echo "no";
    } else {
        echo "yes";
        //echo json_encode("no");
    }
}
if (isset($_GET['sn']) && $_GET['pi'] != "") {
    $pp = $obj->CheckShortNameOnPurchase($_GET['sn'], $_GET['pi'], $_GET['for_hide_id']);
    echo $pp;
}
<?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_po', $_GET['val']);
    $corect_date_format = explode("-", $result['po_due_date']);
    $final_date = $corect_date_format[2] . '-' . $corect_date_format[1] . '-' . $corect_date_format[0];
    $tender_office = $obj->Common_name_id('office', 'office_name', $result['po_office']);
    $tender_purchaser = $obj->Common_name_id('create_purchaser', 'purchaser_short_name', $result['po_purchaser']);
    $tender_firm = $obj->Common_name_id('consignee', 'csign_short_name', $result['po_firm']);
    $result_product = $obj->common_fetch_attachement_withItem_nolimit_Po_History('history_po_firm_product', 'po_id', $_GET['val']);
}
?>
<!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"/>
<script type="text/javascript" src="../js/jquery-1.9.1.min.js"></script>
<style type="text/css">
*
{
	margin:0;
	padding:0;
<?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);
예제 #5
0
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<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'>
<script type="text/javascript" src="main_js/AjaxJavaSCript.js"></script>

</head>
<body>

<?php 
if (isset($_GET['Pid'])) {
    $tender_firms = $obj->common_fetchdata('tender_firms', $_GET['Pid']);
    $firm_name = $obj->Common_name_id('consignee', 'csign_firm_name', $tender_firms['firm']);
    $main_consignee = $obj->Common_name_id('main_consignee', 'main_csign_name', $tender_firms['consignee']);
    $list_firm = $obj->List_Drop_Down("consignee", "csign_firm_name", "id");
    ?>
    <form method="post" action="#" enctype="multipart/form-data">
    <table width="820" border="1" cellspacing="10" id="firm_table">
  <tr>
    <td width="90px;"><label>Select Firm</label></td>
    <td width="200px;"><select id="firm" name="firm">
    <option value="<?php 
    print_r($firm_name['id']);
    ?>
"><?php 
    print_r($firm_name['csign_firm_name']);
    ?>
</option>
}
if (isset($_GET['ot'])) {
    /*if($_GET['st']==0)
    	$status='Uploaded';
    	if($_GET['st']==1)
    	$status='Rate given';
    	if($_GET['st']==2)
    	$status='Partially Quoted';
    	if($_GET['st']==3)
    	$status='Quoted';
    	if($_GET['st']==4)
    	$status='Tender Lapsed';*/
    if ($_GET['ot'] == "%%") {
        $office_name = "All";
    } else {
        $OName = $obj->Common_name_id('office', 'office_name', $_GET['ot']);
        $office_name = $OName['office_name'];
    }
    if ($_GET['pt'] == "%%") {
        $purchaser_name = "All";
    } else {
        $PName = $obj->Common_name_id('create_purchaser', 'purchaser_short_name', $_GET['pt']);
        $purchaser_name = $PName['purchaser_short_name'];
    }
}
// get data by page
//if(isset($_GET['page']) || isset($_POST['submit']))
if (isset($_GET['page']) || isset($_GET['ot'])) {
    /*$OT=$_POST['tender_office'];
    	$PT=$_POST['tender_purchaser'];
    	$ST=$_POST['tender_status'];*/
<?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);
<?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']);
예제 #9
0
<?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">