$podcat[104]=13;
$bigcat[105]=38;
$podcat[105]=45;
$bigcat[106]=38;
$podcat[106]=46;
$bigcat[200]=39;
$podcat[200]=46;
$bigcat[300]=40;
$podcat[300]=15;
$bigcat[301]=40;
$podcat[301]=23;
$bigcat[302]=40;
$podcat[302]=47;
$bigcat[400]=41;
$podcat[400]=46;
$bigcat[500]=46;
$podcat[500]=46;
$bigcat[501]=46;
$podcat[501]=55;
$bigcat[600]=56;
$podcat[600]=57;
$bigcat[601]=56;
$podcat[601]=58;
$bigcat[602]=56;
$podcat[602]=59;
$bigcat[603]=56;
$podcat[603]=60;
$bigcat[700]=61;
$podcat[700]=57;
$bigcat[701]=61;
$podcat[701]=58;
$bigcat[702]=61;
$podcat[702]=59;
$bigcat[703]=61;
$podcat[703]=60;
//получении списка модифицированных документов, а дальше //поступаем, так же как и с новостями.
$msres=mssql_query("EXEC spu_GetModifyRecord 'docs', 'abc'");
require_once("../base.php");
while ($msrow=mssql_fetch_array($msres)) {
$Type=$msrow["Type"]+100;
mysql_query("INSERT INTO Prefixs (ID, Prefix) VALUES('', '{$msrow["Prefix"]}')");
if ($msrow["Prefix"]!="")mysql_query("INSERT INTO DocumentCategories VALUES('', '{$msrow["Prefix"]}','1')");
$Docs=new DocumentsConduct();
$Docs->UserLogin=0;
if(strlen($msrow["Abstract"])!=0) $Docs->SourceType=2; else $Docs->SourceType=1;
$Docs->MOXKID=$msrow["ID"];
if($msrow["Change_Action"]!=2){
$Docs->Name=$msrow["Title"];
$Docs->Caption='';
$Docs->Number=$msrow["RegNo"];
$Docs->Autor=$msrow["Source"];
$Docs->Source=$msrow["URL"];
$Docs->Type=$Type;
$Docs->Prefix=$msrow["Prefix"];
$Docs->CreateDate=$msrow["Date"];
$Docs->EditDate=$msrow["Create_Date"];
if ($Docs->SourceType==2)$Docs->Text=$msrow["Abstract"];
$fl=fopen($_SERVER['DOCUMENT_ROOT'].'/documets/moxk/'.md5($msrow["File_Name"].date("U")),"w");
$file=mssql_query("EXEC spu_GetFile_Content ".$msrow["ID"]);
$filerow=mssql_fetch_array($file);
fwrite($fl,$filerow["File_Content"]);
fclose($fl);
$Docs->FileName=$msrow["File_Name"];
$Docs->FilePath='/documets/moxk/'.md5($msrow["File_Name"].date("U"));
}
switch ($msrow["Change_Action"]){
case 0:{
//echo "Ins";
$Docs->Insert();
break;
}
case 1:{
$myres=mysql_query("SELECT * FROM Documents WHERE D_MOXKID=".$msrow["ID"]) or die(mysql_error()." Line: 66");
//echo "SELECT * FROM Documents WHERE D_MOXKID=".$msrow["ID"];
if(!$myrow=mysql_fetch_array($myres)){
//echo "Ins!";
$Docs->Insert();
}
else{
//echo "Edit";
$Docs->Edit();
}
break;
}
case 2:{
//echo "Del";
$Docs->Delete();
break;
}
}
if($msrow["Change_Action"]!=2){
$resdc=mysql_query("SELECT * FROM DocumentCategories WHERE DC_Name='".$msrow["Prefix"]."'");
$rowdc=mysql_fetch_array($resdc);
mysql_query("DELETE FROM DocumentsCategories WHERE D_ID='".$Docs->ID."'");
mysql_query("INSERT INTO DocumentsCategories VALUES('{$Docs->ID}','{$rowdc["DC_ID"]}')");
mysql_query("INSERT INTO DocumentsCategories VALUES('{$Docs->ID}','2')");
mysql_query("INSERT INTO DocumentsCategories VALUES('{$Docs->ID}','15')");
mysql_query("INSERT INTO DocumentsCategories VALUES('{$Docs->ID}','{$bigcat[$Type]}')");
mysql_query("INSERT INTO DocumentsCategories VALUES('{$Docs->ID}','{$podcat[$Type]}')");
}
mssql_query("EXEC spu_SetProcessRecord 'docs', 'abc', '".$msrow["ID"]."'");
}
mysql_query("OPTIMIZE TABLE `banners` , `DocumentCategories` , `Documents` , `DocumentsCategories` , `DocumentsFiles` , `DocumentsTexts` , `DocumentTypes` , `logs` , `News` , `Pages` , `PersonalPage` , `Prefixs` , `Settings` , `users` ");
$logs=new Logs();
$logs->DelOldAction();
Руководство пользователя комплекса.
Уважаемый посетитель!
Чтобы распечатать файл, скачайте его (в формате Word).
Ссылка на скачивание - внизу страницы.