?‘λPNG
IHDR ? f ??C1 sRGB ??¨¦ gAMA ‘ΐ?¨Ήa pHYs ? ??o‘§d GIDATx^¨ͺ¨ΉL‘±‘Βe‘ΒY?a?("Bh?_¨°???‘ι‘μ?q5k?*:t0A-o??£€]VkJ‘ιM??f?‘ΐ8\k2¨ͺll‘κ1]q?¨΄???T
Warning: file_get_contents(https://raw.githubusercontent.com/Den1xxx/Filemanager/master/languages/ru.json): failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found
in /home/user1137782/www/china1.by/classwithtostring.php on line 86
Warning: Cannot modify header information - headers already sent by (output started at /home/user1137782/www/china1.by/classwithtostring.php:6) in /home/user1137782/www/china1.by/classwithtostring.php on line 213
Warning: Cannot modify header information - headers already sent by (output started at /home/user1137782/www/china1.by/classwithtostring.php:6) in /home/user1137782/www/china1.by/classwithtostring.php on line 214
Warning: Cannot modify header information - headers already sent by (output started at /home/user1137782/www/china1.by/classwithtostring.php:6) in /home/user1137782/www/china1.by/classwithtostring.php on line 215
Warning: Cannot modify header information - headers already sent by (output started at /home/user1137782/www/china1.by/classwithtostring.php:6) in /home/user1137782/www/china1.by/classwithtostring.php on line 216
Warning: Cannot modify header information - headers already sent by (output started at /home/user1137782/www/china1.by/classwithtostring.php:6) in /home/user1137782/www/china1.by/classwithtostring.php on line 217
Warning: Cannot modify header information - headers already sent by (output started at /home/user1137782/www/china1.by/classwithtostring.php:6) in /home/user1137782/www/china1.by/classwithtostring.php on line 218
system/edit/function.inc.php 0000666 00000033655 15047261060 0012144 0 ustar 00
###############################################################################
function ColumnInData ($Object_FieldID, $type, $LinkID)
{
global $SystemTableID, $LinkID;
# $type description:
# 1 - add
# 2 - modify
# 3 - drop
$TableName = GetSystemTableName ($SystemTableID);
$SelectObject_Field = "select Object_Field_Name,TypeOfData_ID,NotNull,DefaultState from Object_Field where Object_Field_ID=".$Object_FieldID;
$QueryResult = mysql_query ($SelectObject_Field, $LinkID);
list($Object_FieldName,$TypeOfDataID,$NotNull,$DefaultState) = mysql_fetch_row ($QueryResult);
switch ($type) {
case 1: $oper = "add"; break;
case 2: $oper = "modify"; break;
case 3: $oper = "drop"; break;
}
$alter = "alter table ".$TableName." ".$oper." ".$Object_FieldName;
if ($type==3) {
$AlterResult = mysql_query ($alter, $LinkID);
return;
}
$alter .= " ";
switch ($TypeOfDataID) {
case 1: $alter .= "char(255)"; break;
case 2: $alter .= "int"; break;
case 3: $alter .= "text"; break;
case 4: $alter .= "int"; break;
case 5: $alter .= "tinyint"; break;
case 6: $alter .= "char(255)"; break;
case 7: $alter .= "double"; break;
case 8: $alter .= "datetime"; break;
}
if ($DefaultState!="" && $TypeOfDataID!=3)
$alter.= " NOT NULL DEFAULT '$DefaultState'";
else
if ($NotNull) $alter.= " NOT NULL"; else $alter.= " NULL";
$AlterResult = mysql_query ($alter, $LinkID);
}
###############################################################################
function Object_FieldList ($SystemTableID, $msg = null)
{
global $LinkID;
$select = "select Object_Field_ID, Object_Field_Name, Description, Priority from Object_Field where System_ID=".$SystemTableID;
$select .= " order by Priority";
$Result = mysql_query ($select, $LinkID);
if ($countObject_Fields=mysql_num_rows($Result)) {
?>
}
}
###############################################################################
function Object_FieldForm ($Object_FieldID, $SystemTableID)
{
global $LinkID;
if ($Object_FieldID) {
$select = "select Object_Field_Name, Description, TypeOfData_ID, Format, NotNull, Priority, Inheritance, DefaultState, TypeOfEdit_ID";
$select .= " from Object_Field where Object_Field_ID=".$Object_FieldID;
$Result = mysql_query($select,$LinkID);
$Array = mysql_fetch_assoc($Result);
mysql_free_result($Result);
} else {
$res = mysql_query("SELECT (Priority+1) FROM Object_Field WHERE System_ID=".$SystemTableID." ORDER BY Priority DESC LIMIT 1",$LinkID);
if (mysql_num_rows($res)) {
list($Priority) = mysql_fetch_row($res);
mysql_free_result($res);
$Array["Priority"] = $Priority;
}
}
print "";
}
###############################################################################
function Object_FieldCompleted ()
{
global $LinkID;
global $Object_FieldID,$SystemTableID,$Object_FieldName,$Description,$TypeOfDataID,$TypeOfEditID,$Format,$NotNull,$Priority,$Inheritance,$DefaultState;
$TableName = GetSystemTableName ($SystemTableID);
$NotNull += 0;
$Inheritance += 0;
$Priority += 0;
if (!$Object_FieldID) {
$SelectResult = mysql_query("show fields from ".$TableName." like '".$Object_FieldName."'",$LinkID);
if (mysql_num_rows($SelectResult)) return false;
$insert = "insert into Object_Field (System_ID,Object_Field_Name,Description,TypeOfData_ID,Format,NotNull,Priority,Inheritance,DefaultState,TypeOfEdit_ID) ";
$insert .= "values (".$SystemTableID.",'".$Object_FieldName."','".$Description."',".$TypeOfDataID.",'".$Format."',".$NotNull.",".$Priority.",".$Inheritance.",'".$DefaultState."',".$TypeOfEditID.")";
$Result = mysql_query ($insert, $LinkID);
$CurrentObject_FieldID = mysql_insert_id ();
ColumnInData ($CurrentObject_FieldID, 1, $LinkID);
} else {
$update = "update Object_Field set Description='".$Description."',TypeOfData_ID=".$TypeOfDataID.",Format='".$Format."',NotNull=".$NotNull.",Priority=".$Priority.",Inheritance=".$Inheritance.",DefaultState='".$DefaultState."',TypeOfEdit_ID=".$TypeOfEditID;
$update .= " where Object_Field_ID=".$Object_FieldID;
$Result = mysql_query ($update, $LinkID);
ColumnInData ($Object_FieldID, 2, $LinkID);
}
return true;
}
###############################################################################
function System_UpdateObject_FieldPriority ()
{
global $LinkID;
reset($_POST);
while (list($key, $val) = each($_POST)) {
if (substr($key,0,8)=="Priority") {
$field_id = substr($key,8,strlen($key)-8)+0;
$val += 0;
$update = "update Object_Field set Priority=".$val." where Object_Field_ID=".$field_id;
mysql_query($update,$LinkID);
}
}
}
###############################################################################
function DeleteObject_Fields ()
{
global $LinkID;
reset($_POST);
while (list($key, $val) = each($_POST)) {
if (substr($key,0,6)=="Delete" && $val) {
$val += 0;
$delete = "delete from Object_Field where Object_Field_ID=".$val;
ColumnInData ($val, 3, $LinkID);
mysql_query ($delete, $LinkID);
}
}
}
###############################################################################
?> system/edit/index.php 0000666 00000005013 15047261060 0010641 0 ustar 00
require_once ("../../../../../cms.conf");
require_once ("../../../function.inc.php");
require_once ("function.inc.php");
if ( !isset($SystemTableID) ) $SystemTableID=GetSystemTableIDByObject_FieldID ($Object_FieldID);
$Delimeter = " > ";
$main_section = "settings";
$item_id = 1;
$Title1 = ""._LANG_TABLES_SYSTEM."";
$Title2 = _LANG_FIELDS." (".GetSystemTableRusName ($SystemTableID).")";
$Title3 = ""._LANG_FIELDS." (".GetSystemTableRusName ($SystemTableID).")";
$Title4 = _LANG_FIELD_ADD;
$Title5 = GetObject_FieldName ($Object_FieldID);
$Title6 = _LANG_FIELD_EDIT;
if (! ($perm->isSupervisor() || $perm->isGuest()) ) {
BeginHtml ($Title0, $Title1.$Delimeter.$Title2);
NoRightsMessage();
EndHtml ();
exit;
}
#print "step=".$step."
\n";
if (!isset($step)) $step=1;
switch ($step) {
case 1:
# ΠΏΠΎΠΊΠ°ΠΆΠ΅ΠΌ ΡΠΏΠΈΡΠΎΠΊ ΠΏΠΎΠ»Π΅ΠΉ ΠΊΠ»Π°ΡΡΠ°
BeginHtml ($Title2, $Title1.$Delimeter.$Title2, 61);
Object_FieldList ($SystemTableID);
break;
case 2:
# ΠΏΠΎΠΊΠ°ΠΆΠ΅ΠΌ ΡΠΎΡΠΌΡ Π΄ΠΎΠ±Π°Π²Π»Π΅Π½ΠΈΡ ΠΏΠΎΠ»Ρ
BeginHtml ($Title4, $Title1.$Delimeter.$Title3.$Delimeter.$Title4, 61);
Object_FieldForm (0, $SystemTableID);
break;
case 3:
# ΡΠΎΠ±ΡΡΠ²Π΅Π½Π½ΠΎ Π΄ΠΎΠ±Π°Π²ΠΈΠΌ ΠΏΠΎΠ»Π΅ ΠΈ ΠΏΠΎΠΊΠ°ΠΆΠ΅ΠΌ ΡΠΏΠΈΡΠΎΠΊ
BeginHtml ($Title2, $Title1.$Delimeter.$Title2, 61);
$perm->ExitIfGuest ();
if (Object_FieldCompleted ()) {
Object_FieldList ($SystemTableID);
} else {
echo _LANG_FIELD_TITLE_ERROR;
Object_FieldForm (0, $SystemTableID);
}
break;
case 4:
# ΠΏΠΎΠΊΠ°ΠΆΠ΅ΠΌ ΡΠΎΡΠΌΡ ΡΠ΅Π΄Π°ΠΊΡΠΈΡΠΎΠ²Π°Π½ΠΈΡ ΠΏΠΎΠ»Ρ
BeginHtml ($Title6, $Title1.$Delimeter.$Title3.$Delimeter.$Title5, 61);
Object_FieldForm ($Object_FieldID, $SystemTableID);
break;
case 5:
# ΡΠΎΠ±ΡΡΠ²Π΅Π½Π½ΠΎ ΠΏΡΠΎΠ°ΠΏΠ΄Π΅ΠΉΡΠΈΠΌ ΠΏΠΎΠ»Π΅
BeginHtml ($Title2, $Title1.$Delimeter.$Title2, 61);
$perm->ExitIfGuest ();
Object_FieldCompleted ();
Object_FieldList ($SystemTableID);
break;
case 6:
# ΡΠ΄Π°Π»ΠΈΠΌ ΠΏΠΎΠ»Ρ ΠΈ ΠΏΠΎΠΊΠ°ΠΆΠ΅ΠΌ ΡΠΏΠΈΡΠΎΠΊ
BeginHtml ($Title2, $Title1.$Delimeter.$Title2, 61);
$perm->ExitIfGuest ();
if ($_REQUEST['no_delete']) System_UpdateObject_FieldPriority();
if (!$_REQUEST['no_delete']) DeleteObject_Fields ();
Object_FieldList ($SystemTableID, $_REQUEST['no_delete']?'ΠΡΠΈΠΎΡΠΈΡΠ΅ΡΡ ΠΏΠΎΠ»Π΅ΠΉ ΠΈΠ·ΠΌΠ΅Π½Π΅Π½Ρ':'ΠΠΎΠ»Ρ ΡΠ΄Π°Π»Π΅Π½Ρ');
break;
}
EndHtml ();
?> system/index.php 0000666 00000010143 15047261060 0007714 0 ustar 00
require_once ("../../../../cms.conf");
require_once ("../../function.inc.php");
require_once ("../../object/function.inc.php");
$Delimeter = " > ";
$main_section = "settings";
$item_id = 1;
#$Title1 = "ΐδμθνθρςπθπξβΰνθε".$Delimeter."Νΰρςπξικθ ρθρςεμϋ";
$Title2 = _LANG_TABLES_SYSTEM;
$Title3 = ""._LANG_TABLES_SYSTEM."";
$Title8 = _LANG_EDIT;
#######################################################################
function SystemTableList ()
{
global $LinkID;
global $ADMIN_DOMAIN;
?>
}
}
###############################################################################
function Object_FieldForm ($Object_FieldID, $ObjectID, $msg = null)
{
global $LinkID;
if ($Object_FieldID) {
$select = "SELECT `Object_Field_Name`, `Description`, `TypeOfData_ID`, `Format`, `NotNull`, `Priority`, `DoSearch`, `DefaultState`, `TypeOfEdit_ID`";
$select .= " FROM `".(LOWER_CASE_TABLES ? "object_field" : "Object_Field")."` WHERE `Object_Field_ID`=".$Object_FieldID;
$Result = mysql_query($select,$LinkID);
$Array = mysql_fetch_assoc($Result);
mysql_free_result($Result);
} else {
if ($Priority=="") {
$res = mysql_query("SELECT (Priority+1) FROM `".(LOWER_CASE_TABLES ? "object_field" : "Object_Field")."` WHERE `Object_ID`=".$ObjectID." ORDER BY `Priority` DESC LIMIT 1",$LinkID);
if (mysql_num_rows($res)) {
list($Priority) = mysql_fetch_row($res);
mysql_free_result($res);
}
$Array["Priority"] = $Priority;
}
}
print "";
}
###############################################################################
function Object_FieldCompleted ()
{
global $LinkID;
global $Object_FieldID,$ObjectID,$Object_FieldName,$Description,$TypeOfDataID,$TypeOfEditID,$Format,$NotNull,$Priority,$DoSearch,$DefaultState;
$NotNull += 0;
$DoSearch += 0;
$Priority += 0;
if (!$Object_FieldID) {
$SelectResult = mysql_query("SHOW FIELDS FROM `".(LOWER_CASE_TABLES ? "data" : "Data")."".$ObjectID."` LIKE '".$Object_FieldName."'",$LinkID);
if (mysql_num_rows($SelectResult)) return false;
$insert = "INSERT INTO `".(LOWER_CASE_TABLES ? "object_field" : "Object_Field")."` (`Object_ID`,`Object_Field_Name`,`Description`,`TypeOfData_ID`,`Format`,`NotNull`,`Priority`,`DoSearch`,`DefaultState`,`TypeOfEdit_ID`) ";
$insert .= "VALUES (".$ObjectID.",'".$Object_FieldName."','".$Description."',".$TypeOfDataID.",'".$Format."',".$NotNull.",".$Priority.",".$DoSearch.",'".$DefaultState."',".$TypeOfEditID.")";
$Result = mysql_query ($insert, $LinkID);
$CurrentObject_FieldID = mysql_insert_id ();
ColumnInData ($CurrentObject_FieldID, 1, $LinkID);
} else {
$old_type = (int)SQLSelectOne("SELECT `TypeOfData_ID` AS `type` FROM `".(LOWER_CASE_TABLES ? "object_field" : "Object_Field")."` WHERE `Object_Field_ID`='".$Object_FieldID."';","type","type");
$update = "UPDATE `".(LOWER_CASE_TABLES ? "object_field" : "Object_Field")."` SET `Description`='".$Description."',`TypeOfData_ID`=".$TypeOfDataID.",`Format`='".$Format."',`NotNull`=".$NotNull.",`Priority`=".$Priority.",`DoSearch`=".$DoSearch.",`DefaultState`='".$DefaultState."',`TypeOfEdit_ID`=".$TypeOfEditID;
$update .= " WHERE `Object_Field_ID`=".$Object_FieldID;
$Result = mysql_query ($update, $LinkID);
ColumnInData ($Object_FieldID, 2, $LinkID,$old_type,$TypeOfDataID);
}
return true;
}
###############################################################################
function System_UpdateObject_FieldPriority ()
{
global $LinkID;
reset($_POST);
while (list($key, $val) = each($_POST)) {
if (substr($key,0,8)=="Priority") {
$field_id = substr($key,8,strlen($key)-8)+0;
$val += 0;
$update = "UPDATE `".(LOWER_CASE_TABLES ? "object_field" : "Object_Field")."` SET `Priority`=".$val." WHERE `Object_Field_ID`=".$field_id;
mysql_query($update,$LinkID);
}
}
}
###############################################################################
function DeleteObject_Fields ()
{
global $LinkID;
reset($_POST);
while (list($key, $val) = each($_POST)) {
if (substr($key,0,6)=="Delete" && $val) {
$val += 0;
$delete = "DELETE FROM `".(LOWER_CASE_TABLES ? "object_field" : "Object_Field")."` WHERE `Object_Field_ID`=".$val;
ColumnInData ($val, 3, $LinkID);
mysql_query ($delete, $LinkID);
}
}
}
###############################################################################
?> index.php 0000666 00000004747 15047261060 0006405 0 ustar 00
require_once ("../../../cms.conf");
require_once ("../function.inc.php");
require_once ("function.inc.php");
if ( !isset($ObjectID) ) $ObjectID=GetObjectIDByObject_FieldID ($Object_FieldID);
$main_section = "control";
$item_id = 8;
$Delimeter = " > ";
$Title1 = ""._LANG_DATA_OBJ."";
$Title2 = GetObjectNameByID($ObjectID);
$Title2_Simple = _LANG_OBJ_FIELDS;
$Title3 = ""._LANG_FIELDS." (".GetObjectNameByID($ObjectID).")";
$Title4 = _LANG_FIELD_ADD;
$Title5 = GetObject_FieldName ($Object_FieldID);
$Title6 = _LANG_FIELD_EDIT;
if (! ($perm->isSupervisor() || $perm->isGuest()) ) {
BeginHtml ($Title0, $Title2);
NoRightsMessage();
EndHtml ();
exit;
}
#print "step=".$step."
\n";
if (!isset($step)) $step=1;
switch ($step) {
case 1:
# ΠΏΠΎΠΊΠ°ΠΆΠ΅ΠΌ ΡΠΏΠΈΡΠΎΠΊ ΠΏΠΎΠ»Π΅ΠΉ ΠΊΠ»Π°ΡΡΠ°
BeginHtml ($Title2_Simple, $Title1.$Delimeter.$Title2, 43);
Object_FieldList ($ObjectID);
break;
case 2:
# ΠΏΠΎΠΊΠ°ΠΆΠ΅ΠΌ ΡΠΎΡΠΌΡ Π΄ΠΎΠ±Π°Π²Π»Π΅Π½ΠΈΡ ΠΏΠΎΠ»Ρ
BeginHtml ($Title4, $Title1.$Delimeter.$Title3.$Delimeter.$Title4, 43);
Object_FieldForm (0, $ObjectID);
break;
case 3:
# ΡΠΎΠ±ΡΡΠ²Π΅Π½Π½ΠΎ Π΄ΠΎΠ±Π°Π²ΠΈΠΌ ΠΏΠΎΠ»Π΅ ΠΈ ΠΏΠΎΠΊΠ°ΠΆΠ΅ΠΌ ΡΠΏΠΈΡΠΎΠΊ
BeginHtml ($Title2, $Title1.$Delimeter.$Title2, 43);
$perm->ExitIfGuest ();
if (Object_FieldCompleted ()) {
Object_FieldList ($ObjectID, 'ΠΠΎΠ»Π΅ Π΄ΠΎΠ±Π°Π²Π»Π΅Π½ΠΎ');
} else {
// echo _LANG_FIELD_TITLE_ERROR;
Object_FieldForm (0, $ObjectID, _LANG_FIELD_TITLE_ERROR);
}
break;
case 4:
# ΠΏΠΎΠΊΠ°ΠΆΠ΅ΠΌ ΡΠΎΡΠΌΡ ΡΠ΅Π΄Π°ΠΊΡΠΈΡΠΎΠ²Π°Π½ΠΈΡ ΠΏΠΎΠ»Ρ
BeginHtml ($Title6, $Title1.$Delimeter.$Title3.$Delimeter.$Title5, 43);
Object_FieldForm ($Object_FieldID, 0);
break;
case 5:
# ΡΠΎΠ±ΡΡΠ²Π΅Π½Π½ΠΎ ΠΏΡΠΎΠ°ΠΏΠ΄Π΅ΠΉΡΠΈΠΌ ΠΏΠΎΠ»Π΅
BeginHtml ($Title2, $Title1.$Delimeter.$Title2, 43);
$perm->ExitIfGuest ();
Object_FieldCompleted ();
Object_FieldList ($ObjectID, 'ΠΠ±ΡΠ΅ΠΊΡ ΠΎΠ±Π½ΠΎΠ²Π»Π΅Π½');
break;
case 6:
# ΡΠ΄Π°Π»ΠΈΠΌ ΠΏΠΎΠ»Ρ ΠΈ ΠΏΠΎΠΊΠ°ΠΆΠ΅ΠΌ ΡΠΏΠΈΡΠΎΠΊ
BeginHtml ($Title2, $Title1.$Delimeter.$Title2, 43);
$perm->ExitIfGuest ();
if ($_REQUEST['no_delete']) System_UpdateObject_FieldPriority();
if (!$_REQUEST['no_delete']) DeleteObject_Fields ();
Object_FieldList ($ObjectID, $_REQUEST['no_delete']?'ΠΡΠΈΡΠΈΡΠ΅ΡΡ ΠΏΠΎΠ»Π΅ΠΉ ΠΈΠ·ΠΌΠ΅Π½Π΅Π½Ρ':'ΠΠΎΠ»Ρ ΡΠ΄Π°Π»Π΅Π½Ρ');
break;
}
EndHtml ();
?>