<?php define("PROTECTED", "OFF"); include "../../../../include/security.php"; if (!$_SESSION["acc_kanc"]) { die("<script>alert('Только для канцелярии!');window.history.go(-1);</script>"); } $SQL_Rep = "SELECT *\r\n \t\tFROM Area\r\n\t\tWHERE id_area={$id_area}"; $Area_Arr = QueryA($SQL_Rep); if (isset($act) && $act == "upd") { if (empty($action)) { $action = 1; } $SQL_Rep = "UPDATE Area \r\n\tSET \r\n\tname_area = '{$name_area}',\r\n\ttype_area = '{$type_area}',\r\n\tcode = '{$code}',\r\n\tmail_index = '{$mail_index}'\r\n\tWHERE \r\n\tid_area={$id_area}"; $Res = Query(0, $SQL_Rep); F_OCICommit(); die("<script>/*alert('Запись обновлена!');*/history.go(-1);</script>"); } if (isset($act) && $act == "del") { $SQL_Rep = "DELETE area WHERE id_area = '{$id_area}'"; $Res = Query(0, $SQL_Rep); F_OCICommit(); die("<script>alert('Запись удалена!');window.location.href='../ViewArea/ViewArea.php'</script>"); } include "UpdArea_.php";
} if (!empty($NameSmall)) { $SerchName = str_replace(array(" ", "'"), array("%", "''"), $NameSmall); $SQL_Rep .= " AND upper(Name_Small) like upper('%{$SerchName}%')"; } if (!empty($Name)) { $SerchName = str_replace(array(" ", "'"), array("%", "''"), $Name); $SQL_Rep .= " AND upper(Name_Enterprise) like upper('%{$SerchName}%')"; } if (!empty($id_country) || !empty($id_city) || !empty($id_street)) { $SQL_Rep .= " AND Enterprise.id_enterprise = addr.id_enterprise"; $SQL_From .= ",(SELECT DISTINCT id_enterprise FROM enterprise_address WHERE 1=1" . (!empty($id_country) ? " AND ID_country = {$id_country}" : '') . (!empty($id_city) ? " AND ID_city = {$id_city}" : '') . (!empty($id_street) ? " AND ID_street = {$id_street}" : '') . ") addr"; } } $SQL_Rep .= " ORDER BY pop DESC NULLS LAST,Name_Call"; $SQL_Rep = "\r\n\tSELECT Enterprise.ID_Enterprise, Name_Call, Callsign, Name_Small, Name_Enterprise, action\r\n\tFROM Enterprise" . $SQL_From . "\r\n\tWHERE \r\n\t1=1" . $SQL_Rep; if (isset($search)) { $SQL_Rep = 'SELECT * FROM (' . $SQL_Rep . ') WHERE ROWNUM <= 100'; } else { $SQL_Rep = 'SELECT * FROM (' . $SQL_Rep . ') WHERE ROWNUM <= 15'; } $EnterpriseArr = QueryA($SQL_Rep); for ($i = 0; $i < sizeof($EnterpriseArr['ID_ENTERPRISE']); $i++) { $SQL_Rep = "\r\n\t\tSELECT ID_Enterprise_Address, Enterprise_address.ID_Type_Address, Name_Type_Address\r\n\t\tFROM Enterprise_address, Type_Address\r\n\t\tWHERE \r\n\t\t\t\tID_Enterprise = " . $EnterpriseArr['ID_ENTERPRISE'][$i] . "\r\n\t\t\tAND Enterprise_address.ID_Type_Address = Type_Address.ID_Type_Address\r\n\t\tORDER BY Enterprise_address.ID_Type_Address"; $EnterpriseArr['ENTERPRISE_ADDRESS'][$i] = QueryA($SQL_Rep); if (!empty($Fam)) { $SQL_Rep = "\r\n\t\t\tSELECT * FROM enterprise_employee \r\n\t\t\tWHERE \t\r\n\t\t\t\t\tID_Enterprise = " . $EnterpriseArr['ID_ENTERPRISE'][$i] . " \r\n\t\t\t\tAND UPPER(fam) LIKE UPPER('%{$Fam}%')"; $EnterpriseArr['ENTERPRISE_EMPLOYEES'][$i] = QueryA($SQL_Rep); } } include "SearchEnterprise_.php";
<?php define("PROTECTED", "OFF"); include "../../../../include/security.php"; include "../../../../include/utils.php"; $CurrUserID = TryTAB_NUM(); $SQL_Rep = "SELECT *\r\n \t\tFROM street WHERE " . (isset($name_street) ? " UPPER(name_street) LIKE UPPER('%{$name_street}%')" : " 1 = 0 ") . " ORDER BY name_street"; $SQL_Rep = "SELECT * FROM (" . $SQL_Rep . ") WHERE ROWNUM <=100"; $Street = QueryA($SQL_Rep); include "ViewStreet_.php";
<?php define("PROTECTED", "OFF"); include "../../../../include/security.php"; include "../../../../include/utils.php"; $CurrUserID = TryTAB_NUM(); $SQL_Rep = "SELECT *\r\n \t\tFROM Enterprise\r\n\t\tWHERE Enterprise.id_enterprise={$id_enterprise}"; $Enterprise_Arr = QueryA($SQL_Rep); $SQL_Rep = "SELECT *\r\n \t\tFROM Enterprise_address,country,city,street,type_address,area\r\n\t\tWHERE Enterprise_address.id_enterprise={$id_enterprise}\r\n\t\tAND Enterprise_address.id_country = country.id_country(+)\r\n\t\tAND Enterprise_address.id_city = city.id_city(+)\r\n\t\tAND Enterprise_address.id_street = street.id_street(+)\r\n\t\tAND Enterprise_address.id_area = area.id_area(+)\r\n\t\tAND Enterprise_address.id_type_address = type_address.id_type_address(+)"; $Enterprise_address = QueryA($SQL_Rep); $SQL_Rep = "SELECT *\r\n \t\tFROM enterprise_employee\r\n\t\tWHERE enterprise_employee.id_enterprise={$id_enterprise}"; $Enterprise_employee = QueryA($SQL_Rep); include "Enterprise_.php";
<?php define("PROTECTED", "OFF"); include "../../../../include/security.php"; include "../../../../include/utils.php"; $CurrUserID = TryTAB_NUM(); $SQL_Rep = "SELECT *\r\n \t\tFROM area WHERE " . (isset($name_area) ? " UPPER(name_area) LIKE UPPER('%{$name_area}%')" : " 1 = 0 ") . " ORDER BY name_area"; $SQL_Rep = "SELECT * FROM (" . $SQL_Rep . ") WHERE ROWNUM <=100"; $Area = QueryA($SQL_Rep); include "ViewArea_.php";
<?php define("PROTECTED", "OFF"); include "../../../../include/security.php"; $type_address = iconv("utf-8", "windows-1251", $_POST['text']); $Cnt = $_POST['size']; $type_address_arr = array(); $SQL_Rep = "SELECT *\r\n FROM type_address\r\n WHERE upper(name_type_address) LIKE upper('{$type_address}%')\r\n\t ORDER BY name_type_address"; $SQL_Rep = "SELECT * FROM (" . $SQL_Rep . ") WHERE ROWNUM < {$Cnt}"; $type_address_arr = QueryA($SQL_Rep); F_OCICommit(); ?> <table id="popupList" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" class="textField"> <? for ( $i = 0; $i < sizeof($type_address_arr["ID_TYPE_ADDRESS"]); $i++ ) { ?> <tr id="tr<? echo $i ?>" style="cursor:pointer" onMouseOver="this.style.background = '#e4eaf2'; if(cur >= 0) document.getElementById('tr' + cur).style.background = '#ffffff'; cur=<? echo $i ?>;" onMouseDown="chResult('<? echoML( $type_address_arr["NAME_TYPE_ADDRESS"][$i] ) ?>',<? echo $type_address_arr["ID_TYPE_ADDRESS"][$i] ?>,<? echo $num ?>)" onClick="chResult('<? echoML( $type_address_arr["NAME_TYPE_ADDRESS"][$i] ) ?>',<? echo $type_address_arr["ID_TYPE_ADDRESS"][$i] ?>,<? echo $num ?>)" > <td> <? echo $type_address_arr["NAME_TYPE_ADDRESS"][$i] ?> </td> </tr> <? } ?> </table>
<?php define("PROTECTED", "OFF"); include "../../../../include/security.php"; include "../../../../include/utils.php"; $CurrUserID = TryTAB_NUM(); $SQL_Rep = "SELECT *\r\n \t\tFROM city WHERE " . (isset($name_city) ? " UPPER(name_city) LIKE UPPER('%{$name_city}%')" : " 1 = 0 ") . " ORDER BY name_city"; $SQL_Rep = "SELECT * FROM (" . $SQL_Rep . ") WHERE ROWNUM <=100"; $City = QueryA($SQL_Rep); include "ViewCity_.php";
<?php define("PROTECTED", "OFF"); include "../../../../include/security.php"; include "../../../../include/utils.php"; if (!$_SESSION["acc_kanc"]) { die("<script>alert('Только для канцелярии!');window.history.go(-1);</script>"); } if (isset($act)) { $SQL_Rep = "INSERT INTO Enterprise ( id_enterprise, name_enterprise,name_small,phone,fax,url,action,email,\r\n\t\t\t\t\t\t\t\t\t\tname_call,callsign,id_enterprise_parent, note,id_ent_last_incarnation ) \r\n VALUES ( seq_id_enterprise.NEXTVAL,'{$name_enterprise}','{$name_small}','{$phone}','{$fax}','{$url}','1','{$email}',\r\n\t\t\t\t\t\t\t \t\t\t'{$name_call}','{$callsign}','{$id_enterprise_parent}', '{$note}','{$id_ent_last_incarnation}' )"; $Res = Query(0, $SQL_Rep); $Res = Query(1, "SELECT seq_id_enterprise.currval id_enterprise FROM dual"); $id_enterprise = F_OCIResult($Res, "ID_ENTERPRISE"); F_OCICommit(); /*die("<script>alert('Запись добавлена!');window.location.href='../../../SearchEnterprise/SearchEnterprise.php?Name=".$name_enterprise."'</script>");*/ die("<script>alert('Запись добавлена!');window.location.href='../ViewEnterprise/ViewEnterprise.php?id_enterprise={$id_enterprise}';</script>"); } $SQL_Rep = "SELECT *\r\n \t\tFROM form_owner\r\n\t\tWHERE action=1\r\n\t\tORDER BY name_form_small"; $form_owner = QueryA($SQL_Rep); include "AddEnterprise_.php";
<?php define("PROTECTED", "OFF"); include "../../../../include/security.php"; $name_city = iconv("utf-8", "windows-1251", $_POST['text']); $Cnt = $_POST['size']; $SQL_Rep = "SELECT *\r\n FROM city\r\n WHERE upper(name_city) LIKE upper('{$name_city}%')\r\n \t ORDER BY LENGTH(name_city),name_city"; $SQL_Rep = "SELECT * FROM (" . $SQL_Rep . ") WHERE ROWNUM < {$Cnt}"; $city_arr = QueryA($SQL_Rep); F_OCICommit(); ?> <table id="popupList" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" class="textField"> <? for ( $i = 0; $i < sizeof($city_arr["ID_CITY"]); $i++ ) { ?> <tr id="tr<? echo $i ?>" style="cursor:pointer" onMouseOver="this.style.background = '#e4eaf2'; if(cur >= 0) document.getElementById('tr' + cur).style.background = '#ffffff'; cur=<? echo $i ?>;" onMouseDown="chResult('<? echoML( $city_arr["NAME_CITY"][$i]) ?>',<? echo $city_arr["ID_CITY"][$i] ?>,<? echo $num ?>)" onClick="chResult('<? echoML( $city_arr["NAME_CITY"][$i]) ?>',<? echo $city_arr["ID_CITY"][$i] ?>,<? echo $num ?>)" > <td> <? echo $city_arr["TYPE_CITY"][$i] . '. ' . $city_arr["NAME_CITY"][$i] ?> </td> </tr> <? } ?> </table>
<?php define("PROTECTED", "OFF"); include "../../../../include/security.php"; include "../../../../include/utils.php"; $CurrUserID = TryTAB_NUM(); $SQL_Rep = "SELECT *\r\n \t\tFROM Enterprise\r\n\t\tWHERE Enterprise.id_enterprise={$id_enterprise}"; $Enterprise_Arr = QueryA($SQL_Rep); $SQL_Rep = "\r\n \t\tSELECT \r\n\t\t\tEnterprise_address.*, country.*,city.*,street.*,\r\n\t\t\ttype_address.*, area.*, department.name_department,\r\n Enterprise_address.mail_index mail_index_address,\r\n\t\t\tEnterprise_address.action action_address\r\n \t\tFROM Enterprise_address,country,city,street,type_address,area,department\r\n\t\tWHERE Enterprise_address.id_enterprise={$id_enterprise}\r\n\t\t\tAND Enterprise_address.id_country = country.id_country(+)\r\n\t\t\tAND Enterprise_address.id_city = city.id_city(+)\r\n\t\t\tAND Enterprise_address.id_street = street.id_street(+)\r\n\t\t\tAND Enterprise_address.id_area = area.id_area(+)\r\n\t\t\tAND Enterprise_address.id_type_address = type_address.id_type_address(+)\r\n\t\t\tAND Enterprise_address.id_department = department.id_department(+)\r\n\t\tORDER BY action_address DESC"; $Enterprise_address = QueryA($SQL_Rep); $SQL_Rep = "\r\n\t\tUPDATE Enterprise SET\r\n\t\t\tsort = sort+1\r\n\t\tWHERE \r\n\t\t\tid_enterprise = '{$id_enterprise}'"; $Res = Query(0, $SQL_Rep); F_OCICommit(); include "ViewAddress_.php";
<?php define("PROTECTED", "OFF"); include "../../../../include/security.php"; include "../../../../include/utils.php"; $CurrUserID = TryTAB_NUM(); $SQL_Rep = "\r\n\tSELECT *\r\n\tFROM Enterprise\r\n\tWHERE Enterprise.id_enterprise={$id_enterprise}"; $Enterprise_Arr = QueryA($SQL_Rep); $SQL_Rep = "\r\n\tSELECT *\r\n\tFROM department\r\n\tWHERE id_enterprise={$id_enterprise}\r\n\tORDER BY num_department"; $Enterprise_department = QueryA($SQL_Rep); include "ViewDepartment_.php";
<?php define("PROTECTED", "OFF"); include "../../../../include/security.php"; include "../../../../include/utils.php"; $CurrUserID = TryTAB_NUM(); $SQL_Rep = "\r\n\tSELECT Enterprise.*, \r\n\t\te2.name_small name_small_parent,\t\r\n\t\te3.name_call name_ent_last_incarnation,\r\n\t\tTO_CHAR(enterprise.date_change,'DD.MM.YYYY') A\r\n\tFROM Enterprise, Enterprise e2, Enterprise e3\r\n\tWHERE \tEnterprise.id_enterprise={$id_enterprise}\r\n\t\tAND Enterprise.id_enterprise_parent=e2.id_enterprise(+)\r\n\t\tAND Enterprise.id_ent_last_incarnation=e3.id_enterprise(+)"; $Enterprise_Arr = QueryA($SQL_Rep); $SQL_Rep = "UPDATE Enterprise SET\r\n\t\tpop = DECODE(pop,NULL,0,pop) + 1,\r\n\t\tsort = DECODE(sort,NULL,0,sort) + 1\r\n\tWHERE \r\n\t\tid_enterprise = '{$id_enterprise}'"; $Res = Query(0, $SQL_Rep); F_OCICommit(); $SQL_Rep = "\r\n\tSELECT * \r\n\tFROM Enterprise\r\n\tWHERE \tID_ent_last_incarnation = {$id_enterprise}"; $Enterprise_incarnation_Arr = QueryA($SQL_Rep); include "ViewEnterprise_.php";
<?php define("PROTECTED", "OFF"); include "security.php"; include "utils.php"; $text = iconv("utf-8", "windows-1251", $_POST['text']); $Cnt = $_POST['size']; $num = $_POST['num']; // $Pers = str_replace( " ","%",$Pers ); $SQL_Rep = "\r\n SELECT * FROM enterprise \r\n WHERE \r\n\t REPLACE(UPPER(Name_Call||' '||Name_Small||' '||Name_Enterprise),'\"') LIKE \r\n\t REPLACE(UPPER('%' || TRIM('{$text}') || '%'),'\"')\r\n ORDER BY pop DESC NULLS LAST,Name_Call\r\n "; $SQL_Rep = "SELECT * FROM (" . $SQL_Rep . ") WHERE ROWNUM <= {$Cnt} + 1"; //die($SQL_Rep); $enterprise_arr = QueryA($SQL_Rep); F_OCICommit(); ?> <table id="popupList" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" class="textField"> <? for ( $i = 0; $i < sizeof($enterprise_arr["ID_ENTERPRISE"]) && $i < $Cnt; $i++ ) { ?> <tr id="tr<? echo $i ?>" style="cursor:pointer" onMouseOver="this.style.background = '#e4eaf2'; if(cur >= 0) document.getElementById('tr' + cur).style.background = '#ffffff'; cur=<? echo $i ?>;" onMouseDown="chResult('<? echo htmlspecialchars(str_replace ("\r\n", ' ', $enterprise_arr["NAME_CALL"][$i]),ENT_QUOTES) ?>',<? echo $enterprise_arr["ID_ENTERPRISE"][$i] ?>,<? echo $num ?>); <? if(!empty($_POST['Click'])) echo "Click($num);" ?>" onClick="chResult('<? echo htmlspecialchars(str_replace ("\r\n", ' ', $enterprise_arr["NAME_CALL"][$i]),ENT_QUOTES) ?>',<? echo $enterprise_arr["ID_ENTERPRISE"][$i] ?>,<? echo $num ?>); <? if(!empty($_POST['Click'])) echo "Click($num);" ?>" > <td style="padding-left:20px; text-indent:-19px; border-bottom:#C5DEF5 solid 1px;"> <? $s = htmlspecialchars($enterprise_arr["NAME_CALL"][$i],ENT_QUOTES); if($text!='')$s = preg_replace("/(".str_replace("/","\/",trim($text)).")/i",'<b>$1</b>',$s);
<?php define("PROTECTED", "OFF"); include "../../../../include/security.php"; if (!$_SESSION["acc_kanc"]) { die("<script>alert('Только для канцелярии!');window.history.go(-1);</script>"); } if (empty($action)) { $action = 1; } if (empty($boss)) { $boss = 0; } else { $boss = 1; } if (isset($act)) { $SQL_Rep = "INSERT INTO Enterprise_employee ( id_enterprise_employee,id_enterprise, fam,\r\n\timj,otch,phone,email,phone4,id_department,post,date_birthday,to_fam,to_imj,to_otch,to_post,action, mobile_phone,boss ) \r\n VALUES ( seq_id_enterprise_employee.NEXTVAL,'{$id_enterprise}','{$fam}',\r\n\t'{$imj}','{$otch}','{$phone}','{$email}','{$phone4}','{$id_department}','{$post}',TO_DATE('{$date_birthday}', 'DD/MM/YYYY'),\r\n\t'{$to_fam}','{$to_imj}','{$to_otch}','{$to_post}',{$action},'{$mobile_phone}',{$boss})"; $Res = Query(0, $SQL_Rep); F_OCICommit(); die("<script>alert('Запись добавлена!');window.location.href='../ViewEmployee/ViewEmployee.php?id_enterprise=" . $id_enterprise . "'</script>"); } $SQL_Rep = "SELECT *\r\n \t\tFROM Enterprise\r\n\t\tWHERE Enterprise.id_enterprise={$id_enterprise}"; $Enterprise_Arr = QueryA($SQL_Rep); $SQL_Rep = "SELECT *\r\n \t\tFROM department\r\n\t\tWHERE id_enterprise={$id_enterprise} ORDER BY name_department"; $Department_Arr = QueryA($SQL_Rep); include "AddEmployee_.php";
<?php define("PROTECTED", "OFF"); include "../../../../include/security.php"; if (!$_SESSION["acc_kanc"]) { die("<script>alert('Только для канцелярии!');window.history.go(-1);</script>"); } $SQL_Rep = "SELECT *\r\n \t\tFROM country\r\n\t\tWHERE id_country={$id_country}"; $Country_Arr = QueryA($SQL_Rep); if (isset($act) && $act == "upd") { if (!isset($action)) { $action = 1; } $SQL_Rep = "UPDATE Country \r\n\tSET \r\n\tname_country = '{$name_country}', \r\n\taction = '{$action}',\r\n\tcode_m = '{$code_m}',\r\n\tpost_zone = '{$post_zone}',\r\n\tname_country_eng = '{$name_country_eng}'\r\n\tWHERE \r\n\tid_country={$id_country}"; //die ($SQL_Rep ); $Res = Query(0, $SQL_Rep); F_OCICommit(); die("<script>/*alert('Запись обновлена!');*/history.go(-1);</script>"); } if (isset($act) && $act == "del") { $SQL_Rep = "DELETE country WHERE id_country = '{$id_country}'"; $Res = Query(0, $SQL_Rep); F_OCICommit(); die("<script>alert('Запись удалена!');window.location.href='../ViewCountry/ViewCountry.php'</script>"); } include "UpdCountry_.php";
<?php define("PROTECTED", "OFF"); include "../../../../include/security.php"; include "../../../../include/utils.php"; $CurrUserID = TryTAB_NUM(); $SQL_Rep = "SELECT *\r\n \t\tFROM country WHERE " . (isset($name_country) ? " UPPER(name_country) LIKE UPPER('%{$name_country}%')" : " 1 = 0 ") . " ORDER BY name_country"; $SQL_Rep = "SELECT * FROM (" . $SQL_Rep . ") WHERE ROWNUM <=100"; $Country = QueryA($SQL_Rep); include "Viewcountry_.php";
<?php define("PROTECTED", "OFF"); include "../../../../include/security.php"; $name_street = iconv("utf-8", "windows-1251", $_POST['text']); $Cnt = $_POST['size']; $SQL_Rep = "SELECT *\r\n FROM street\r\n WHERE upper(name_street) LIKE upper('{$name_street}%')\r\n\t ORDER BY LENGTH(name_street),name_street"; $SQL_Rep = "SELECT * FROM (" . $SQL_Rep . ") WHERE ROWNUM < {$Cnt}"; $street_arr = QueryA($SQL_Rep); F_OCICommit(); ?> <table id="popupList" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" class="textField"> <? for ( $i = 0; $i < sizeof($street_arr["ID_STREET"]); $i++ ) { ?> <tr id="tr<? echo $i ?>" style="cursor:pointer" onMouseOver="this.style.background = '#e4eaf2'; if(cur >= 0) document.getElementById('tr' + cur).style.background = '#ffffff'; cur=<? echo $i ?>;" onMouseDown="chResult('<? echoML( $street_arr["NAME_STREET"][$i] ) ?>',<? echo $street_arr["ID_STREET"][$i] ?>,<? echo $num ?>)" onClick="chResult('<? echoML( $street_arr["NAME_STREET"][$i] ) ?>',<? echo $street_arr["ID_STREET"][$i] ?>,<? echo $num ?>)" > <td> <? echo $street_arr["NAME_STREET"][$i] ?> </td> </tr> <? } ?> </table>
<?php define("PROTECTED", "OFF"); include "../../../../include/security.php"; $name_area = iconv("utf-8", "windows-1251", $_POST['text']); $Cnt = $_POST['size']; $SQL_Rep = "SELECT *\r\n FROM area\r\n WHERE upper(name_area) LIKE upper('%{$name_area}%')\r\n\t ORDER BY LENGTH(name_area),name_area"; $SQL_Rep = "SELECT * FROM (" . $SQL_Rep . ") WHERE ROWNUM < {$Cnt}"; $area_arr = QueryA($SQL_Rep); F_OCICommit(); ?> <table id="popupList" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" class="textField"> <? for ( $i = 0; $i < sizeof($area_arr["ID_AREA"]); $i++ ) { ?> <tr id="tr<? echo $i ?>" style="cursor:pointer" onMouseOver="this.style.background = '#e4eaf2'; if(cur >= 0) document.getElementById('tr' + cur).style.background = '#ffffff'; cur=<? echo $i ?>;" onMouseDown="chResult('<? echoML( $area_arr["NAME_AREA"][$i] ) ?>',<? echo $area_arr["ID_AREA"][$i] ?>,<? echo $num ?>)" onClick="chResult('<? echoML( $area_arr["NAME_AREA"][$i] ) ?>',<? echo $area_arr["ID_AREA"][$i] ?>,<? echo $num ?>)" > <td> <? echo $area_arr["NAME_AREA"][$i] . ' ' . $area_arr["TYPE_AREA"][$i] ?> </td> </tr> <? } ?> </table>
<?php define("PROTECTED", "OFF"); include "../../../../include/security.php"; if (!$_SESSION["acc_kanc"]) { die("<script>alert('Только для канцелярии!');window.history.go(-1);</script>"); } $SQL_Rep = "SELECT *\r\n \t\tFROM city\r\n\t\tWHERE id_city={$id_city}"; $City_Arr = QueryA($SQL_Rep); if (isset($act) && $act == "upd") { if (empty($action)) { $action = 1; } $SQL_Rep = "UPDATE City \r\n\tSET \r\n\tname_city = '{$name_city}',\r\n\ttype_city = '{$type_city}',\r\n\tcode = '{$code}',\r\n\tindex_ = '{$index_}'\r\n\tWHERE \r\n\tid_city={$id_city}"; $Res = Query(0, $SQL_Rep); F_OCICommit(); die("<script>/*alert('Запись обновлена!');*/history.go(-1);</script>"); } if (isset($act) && $act == "del") { $SQL_Rep = "DELETE city WHERE id_city = '{$id_city}'"; $Res = Query(0, $SQL_Rep); F_OCICommit(); die("<script>alert('Запись удалена!');window.location.href='../ViewCity/ViewCity.php'</script>"); } include "UpdCity_.php";
<?php define("PROTECTED", "OFF"); include "../../../../include/security.php"; if (!$_SESSION["acc_kanc"]) { die("<script>alert('Только для канцелярии!');window.history.go(-1);</script>"); } if (isset($act)) { $SQL_Rep = "INSERT INTO department ( id_department,name_department,num_department,id_enterprise,fax,phone,email,action_dep) \r\n VALUES ( seq_id_department.NEXTVAL,'{$name_department}','{$num_department}','{$id_enterprise}','{$fax}','{$phone}','{$email}',1)"; $Res = Query(0, $SQL_Rep); F_OCICommit(); die("<script>alert('Запись добавлена!');window.location.href='../ViewDepartment/ViewDepartment.php?id_enterprise=" . $id_enterprise . "'</script>"); } $SQL_Rep = "SELECT *\r\n \t\tFROM Enterprise\r\n\t\tWHERE Enterprise.id_enterprise={$id_enterprise}"; $Enterprise_Arr = QueryA($SQL_Rep); include "AddDepartment_.php";
<?php define("PROTECTED", "OFF"); include "../../../../include/security.php"; if (!$_SESSION["acc_kanc"]) { die("<script>alert('Только для канцелярии!');window.history.go(-1);</script>"); } $SQL_Rep = "SELECT *\r\n \t\tFROM Street\r\n\t\tWHERE id_street={$id_street}"; $Street_Arr = QueryA($SQL_Rep); if (isset($act) && $act == "upd") { if (empty($action)) { $action = 1; } $SQL_Rep = "UPDATE Street \r\n\tSET \r\n\tname_street = '{$name_street}',\r\n\ttype = '{$type}',\r\n\tcode = '{$code}',\r\n\tindex_street = '{$index_street}',\r\n\tgninmb = '{$gninmb}'\r\n\tWHERE \r\n\tid_street={$id_street}"; $Res = Query(0, $SQL_Rep); F_OCICommit(); die("<script>/*alert('Запись обновлена!');*/history.go(-1);</script>"); } if (isset($act) && $act == "del") { $SQL_Rep = "DELETE street WHERE id_street = '{$id_street}'"; $Res = Query(0, $SQL_Rep); F_OCICommit(); die("<script>alert('Запись удалена!');window.location.href='../ViewStreet/ViewStreet.php'</script>"); } include "UpdStreet_.php";