SourceTable = $objSession->GetEditTable("News"); $objEditCat->EnablePaging = FALSE; //Multiedit init $en = (int)$_GET["en"]; $objEditCat->Query_Item("SELECT * FROM ".$objEditCat->SourceTable); $itemcount=$objEditCat->NumItems(); $c = $objEditCat->GetItemByIndex($en); unset($objEditItems); $objEditItems = new clsItemReviewList(); $objEditItems->SourceTable = $objSession->GetEditTable("ItemReview"); if(isset($_POST["itemlist"])) { if(is_array($_POST["itemlist"])) { $ReviewId = $_POST["itemlist"][0]; } else { $ReviewId = $_POST["itemlist"]; } $Rev = $objEditItems->GetItem($ReviewId); $action = "m_review_edit"; } else { $Rev = new clsItemReview(); $Rev->Set("ItemId",$c->Get("ResourceId")); $Rev->Set("ItemType",2); $Rev->Set("Status",2); $Rev->Set("Priority",0); $Rev->Set("CreatedById",$objSession->Get("PortalUserId")); $Rev->Set("CreatedOn",adodb_date("U")); $action = "m_review_add"; } $envar = "env=" . BuildEnv() . "&en=$en"; $section = 'in-news:editarticle_review'; $ado = &GetADODBConnection(); if(is_numeric($Rev->Get("CreatedById"))) { if($Rev->Get("CreatedById")>0) { $u = $objUsers->GetUser($Rev->Get("CreatedById")); $login_name = $u->Get("Login"); } else $login_name = "root"; } else { if($objSession->Get("PortalUserId")>0) { $u = $objUsers->Get($objSession->Get("PortalUserId")); $login_name = $u->Get("CreatedById"); } else $login_name="root"; } $title = prompt_language("la_Text_Editing")." ".prompt_language("la_Text_Article")." '".$c->Get("Title")."' - ".prompt_language("la_tab_Reviews")." by ".$login_name; $objListToolBar = new clsToolBar(); $objListToolBar->Add("img_save", "la_Save","#","swap('img_save','toolbar/tool_select_f2.gif');", "swap('img_save', 'toolbar/tool_select.gif');","do_save_review('article','in-news/admin/addarticle_reviews.php',0);",$imagesURL."/toolbar/tool_select.gif"); $objListToolBar->Add("img_cancel", "la_Cancel","#","swap('img_cancel','toolbar/tool_cancel_f2.gif');", "swap('img_cancel', 'toolbar/tool_cancel.gif');","do_save_review('article','in-news/admin/addarticle_reviews.php',-1);",$imagesURL."/toolbar/tool_cancel.gif"); int_header($objListToolBar,NULL,$title); if ($objSession->GetVariable("HasChanges") == 1) { ?>