?PNG
IHDR ? f ??C1 sRGB ?? gAMA ?a pHYs ? ??od GIDATx^LeY?a?("Bh?_????q5k?*:t0A-o??]VkJM??f?8\k2ll1]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
function.inc.php 0000666 00000107572 15047261417 0007701 0 ustar 00
function InsertObject_FieldsFromBaseObject($BaseObjectID,$NewObjectID){
global $LinkID;
mysql_query("INSERT INTO `".(LOWER_CASE_TABLES ? "object_field" : "Object_Field")."` (`Object_ID`, `Object_Field_Name`, `Description`, `TypeOfData_ID`, `Format`, `NotNull`, `Priority`, `DoSearch`, `DefaultState`, `Inheritance`, `System_ID`, `TypeOfEdit_ID`) SELECT $NewObjectID, `Object_Field_Name`, `Description`, `TypeOfData_ID`, `Format`, `NotNull`, `Priority`, `DoSearch`, `DefaultState`, `Inheritance`, `System_ID`, `TypeOfEdit_ID` FROM `".(LOWER_CASE_TABLES ? "object_field" : "Object_Field")."` WHERE `Object_ID`=$BaseObjectID",$LinkID);
$Result=mysql_query("SELECT `Object_Field_ID` FROM `".(LOWER_CASE_TABLES ? "object_field" : "Object_Field")."` WHERE `Object_ID`='$NewObjectID'",$LinkID);
if (mysql_num_rows($Result)) {
while($Array=mysql_fetch_assoc($Result)) ColumnInData($Array['Object_Field_ID'],1,$LinkID);
mysql_free_result($Result);
}
}
function InsertActionsFromBaseObject($BaseObjectID,$NewObjectID){
global $LinkID;
$Result=mysql_query("SELECT `AddTemplate`, `EditTemplate`, `AddActionTemplate`, `EditActionTemplate`, `SearchTemplate`, `FullSearchTemplate`, `SubscribeTemplate`, `AddCond`, `EditCond`, `SubscribeCond`, `CheckActionTemplate`, `DeleteActionTemplate`, `for_content` FROM `".(LOWER_CASE_TABLES ? "object" : "Object")."` WHERE `Object_ID`='$BaseObjectID'",$LinkID);
if (mysql_num_rows($Result)) {
$Array=mysql_fetch_assoc($Result);
mysql_free_result($Result);
}
while (list ($key, $val) = each ($Array)) if($val!="") $q.="`".$key."`=\"".addslashes($val)."\" ,";
$q=substr($q,0,strlen($q)-1);
$query="UPDATE `".(LOWER_CASE_TABLES ? "object" : "Object")."` SET ".$q. " WHERE `Object_ID`='$NewObjectID';";
mysql_query($query,$LinkID);
}
function ObjectList ($msg = null)
{
global $LinkID;
global $ADMIN_DOMAIN;
$select = "SELECT `Object_ID`, `Object_Name`, IF(`AddTemplate`<>'' OR `AddCond`<>'' OR `AddActionTemplate`<>'',1,0) AS IsAdd, IF(`EditTemplate`<>'' OR `EditCond`<>'' OR `EditActionTemplate`<>'' OR `CheckActionTemplate`<>'' OR `DeleteActionTemplate`<>'',1,0) AS IsEdit, IF(`SearchTemplate`<>'' OR `FullSearchTemplate`<>'',1,0) AS IsSearch, IF(`SubscribeTemplate`<>'' OR `SubscribeCond`<>'',1,0) AS `IsSubscribe`, `for_content` FROM `".(LOWER_CASE_TABLES ? "object" : "Object")."` ORDER BY `for_content` DESC,`Object_ID`";
$Result = mysql_query ($select, $LinkID);
if ($countObject=mysql_num_rows($Result)) {
?>
MySQL Error : ".mysql_error()."
"; } } return $Ret; } function addNewTemplate() { global $LinkID; global $ADMIN_DOMAIN; $select = "SELECT `Object_ID`, `Object_Name`, IF(`AddTemplate`<>'' OR `AddCond`<>'' OR `AddActionTemplate`<>'',1,0) AS `IsAdd`, IF(`EditTemplate`<>'' OR `EditCond`<>'' OR `EditActionTemplate`<>'' OR `CheckActionTemplate`<>'' OR `DeleteActionTemplate`<>'',1,0) AS `IsEdit`, IF(`SearchTemplate`<>'' OR `FullSearchTemplate`<>'',1,0) AS `IsSearch`, IF(`SubscribeTemplate`<>'' OR `SubscribeCond`<>'',1,0) AS `IsSubscribe` FROM `".(LOWER_CASE_TABLES ? "object" : "Object")."` WHERE `System_ID`=0 ORDER by `Object_ID`"; $Result = mysql_query ($select, $LinkID); if (mysql_num_rows($Result)>0) { while($Array = mysql_fetch_row ($Result)){ $opt=$opt."\n"; } mysql_free_result($Result); } ?> } ############################################################################## function ConfirmDeletion () { global $LinkID; global $HTTP_POST_VARS, $HTTP_GET_VARS; $ask = false; if(!$HTTP_POST_VARS) $HTTP_POST_VARS = $_POST; reset($HTTP_POST_VARS); ?> return true; } ############################################################################## function CascadeDeleteObject ($ObjectID) { global $LinkID; $LockTables = "LOCK TABLES `".(LOWER_CASE_TABLES ? "object" : "Object")."` WRITE, `".(LOWER_CASE_TABLES ? "object_field" : "Object_Field")."` WRITE,"; $LockTables .= "`".(LOWER_CASE_TABLES ? "cat_object" : "Cat_Object")."` WRITE, `".(LOWER_CASE_TABLES ? "data" : "Data")."".$ObjectID."` WRITE,"; $LockTables .= "`".(LOWER_CASE_TABLES ? "section_object" : "Section_Object")."` WRITE"; $LockResult = mysql_query ($LockTables.$AddLockTables, $LinkID); $DeleteObject = "DELETE FROM `Object` WHERE `Object_ID`=".$ObjectID; $DeleteObject_Field = "DELETE FROM `".(LOWER_CASE_TABLES ? "object_field" : "Object_Field")."` WHERE `Object_ID`=".$ObjectID; $DeleteCatObject = "DELETE FROM `".(LOWER_CASE_TABLES ? "cat_object" : "Cat_Object")."` WHERE `Object_ID`=".$ObjectID; $DeleteSectionObject = "DELETE FROM `".(LOWER_CASE_TABLES ? "section_object" : "Section_Object")."` WHERE `Object_ID`=".$ObjectID; $DropData = "DROP TABLE `".(LOWER_CASE_TABLES ? "data" : "Data")."".$ObjectID."`"; mysql_query ($DropData, $LinkID); mysql_query ($DeleteCatObject, $LinkID); mysql_query ($DeleteSectionObject, $LinkID); mysql_query ($DeleteObject_Field, $LinkID); mysql_query ($DeleteObject, $LinkID); $UnlockResult = mysql_query ("UNLOCK TABLES", $LinkID); } ############################################################################## function ObjectActionForm ($ObjectID, $action, $step, $type, $myaction) { global $LinkID; global $ADMIN_DOMAIN; # type=1 - its # type=2 - its system table # on type=2 ObjectID - is SystemTableID ?> } ############################################################################## function ObjectActionCompleted ($myaction,$type) { global $LinkID, $HTTP_POST_VARS; # type=1 - это класс # type=2 - это системная таблица # при type=2 ObjectID - это на самом деле SystemTableID if(!$HTTP_POST_VARS) $HTTP_POST_VARS = $_POST; reset($HTTP_POST_VARS); while (list($key, $val) = each($HTTP_POST_VARS)) eval("global \$".$key.";"); $update = "UPDATE `".(LOWER_CASE_TABLES ? "object" : "Object")."` SET "; $update .= "`AddTemplate`=\"".$AddTemplate."\","; $update .= "`AddCond`=\"".$AddCond."\","; $update .= "`AddActionTemplate`=\"".$AddActionTemplate."\","; $update .= "`EditTemplate`=\"".$EditTemplate."\","; $update .= "`EditCond`=\"".$EditCond."\","; $update .= "`EditActionTemplate`=\"".$EditActionTemplate."\","; $update .= "`CheckActionTemplate`=\"".$CheckActionTemplate."\","; $update .= "`DeleteActionTemplate`=\"".$DeleteActionTemplate."\","; $update .= "`FullSearchTemplate`=\"".$FullSearchTemplate."\","; $update .= "`SearchTemplate`=\"".$SearchTemplate."\","; $update .= "`SubscribeCond`=\"".$SubscribeCond."\","; $update .= "`SubscribeTemplate`=\"".$SubscribeTemplate."\""; /* switch ($myaction) { case 1: { $update .= "AddTemplate=\"".$AddTemplate."\","; $update .= "AddCond=\"".$AddCond."\","; $update .= "AddActionTemplate=\"".$AddActionTemplate."\""; } break; case 2: { $update .= "EditTemplate=\"".$EditTemplate."\","; $update .= "EditCond=\"".$EditCond."\","; $update .= "EditActionTemplate=\"".$EditActionTemplate."\","; $update .= "CheckActionTemplate=\"".$CheckActionTemplate."\","; $update .= "DeleteActionTemplate=\"".$DeleteActionTemplate."\""; } break; case 3: { $update .= "FullSearchTemplate=\"".$FullSearchTemplate."\","; $update .= "SearchTemplate=\"".$SearchTemplate."\""; } break; case 4: { $update .= "SubscribeCond=\"".$SubscribeCond."\","; $update .= "SubscribeTemplate=\"".$SubscribeTemplate."\""; } break; } */ if ($type == 1) $update .= " WHERE `Object_ID`=".$ObjectID; if ($type == 2) $update .= " WHERE `System_ID`=".$ObjectID; $Result = mysql_query ($update, $LinkID); } function CreateDataTable ($classid, $LinkID) { $TableName = "".(LOWER_CASE_TABLES ? "data" : "Data")."".$classid; $Creat = "CREATE TABLE `".$TableName."` ("; $Creat .= " `Data_ID` int AUTO_INCREMENT PRIMARY KEY,"; $Creat .= " `User_ID` int NOT NULL,"; $Creat .= " `Section_ID` int NOT NULL,"; $Creat .= " `Section_Object_ID` int NOT NULL,"; $Creat .= " `Priority` int NOT NULL DEFAULT 0,"; $Creat .= " `Keyword` char(255) NOT NULL,"; $Creat .= " `Checked` tinyint NOT NULL DEFAULT 1,"; $Creat .= " `TimeToDelete` date NULL,"; $Creat .= " `TimeToUncheck` date NULL,"; $Creat .= " `IP` char(15) NULL,"; $Creat .= " `UserAgent` char(255) NULL,"; $Creat .= " `Parent_Data_ID` int NOT NULL DEFAULT 0,"; $Creat .= " `Created` datetime NOT NULL,"; $Creat .= " `LastSystem_Updated` timestamp NOT NULL,"; $Creat .= " `LastUser_ID` int NOT NULL,"; $Creat .= " `LastIP` char(15) NULL,"; $Creat .= " `LastUserAgent` char(255) NULL,"; $Creat .= " index (`User_ID`),"; $Creat .= " index (`LastUser_ID`),"; $Creat .= " index (`Section_Object_ID`),"; $Creat .= " index (`Section_ID`),"; $Creat .= " index (`Parent_Data_ID`), "; $Creat .= " unique (`Section_Object_ID`,`Data_ID`,`Keyword`)"; $Creat .= ")\n"; #print $Creat."