SourceTable = $objSession->GetEditTable("News"); $objEditItems->EnablePaging = FALSE; $objReviewList = new clsItemReviewList(); $objReviewList->SourceTable = $objSession->GetEditTable("ItemReview"); $en = (int)GetVar('en'); $objEditItems->Query_Item("SELECT * FROM ".$objEditItems->SourceTable); $itemcount=$objEditItems->NumItems(); $c = $objEditItems->GetItemByIndex($en); if($itemcount>1) { if ($en+1 == $itemcount) $en_next = -1; else $en_next = $en+1; if ($en == 0) $en_prev = -1; else $en_prev = $en-1; } //Set Section $section = 'in-news:editarticle_reviews'; //Set Environment Variable $envar = "env=" . BuildEnv() . "&en=$en"; $saveURL = $admin."/".$objSession->GetVariable('ReturnScript'); $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_edit_save('article','".$saveURL."',1);","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_edit_save('article','".$saveURL."',2);","tool_cancel.gif"); if($itemcount == 1) $objListToolBar->Add("divider"); $objListToolBar->Set("section",$section); $objListToolBar->Set("load_menu_func",""); $objListToolBar->Set("CheckClass","RevChecks"); $objListToolBar->Set("CheckForm","article"); //Display header $sec = $objSections->GetSection($section); if ( isset($en_prev) || isset($en_next) ) { $url = $RootUrl."/in-news/admin/addarticle_reviews.php"; $StatusField = "NewsEditStatus"; $form = "article"; MultiEditButtons($objListToolBar,$en_next,$en_prev,$form,$StatusField,$url,$sec->Get("OnClick")); $objListToolBar->Add("divider"); } $listImages = array(); //$img, $alt, $link, $onMouseOver, $onMouseOut, $onClick $objListToolBar->Add("new_review", "la_ToolTip_New_Review",$rootURL."in-news/admin/addreview.php?".$envar,"swap('new_review','toolbar/tool_new_review_f2.gif');", "swap('new_review', 'toolbar/tool_new_review.gif');", "","tool_new_review.gif"); $objListToolBar->Add("review_edit","la_ToolTip_Edit","#", "if (RevChecks.itemChecked()) swap('review_edit','toolbar/tool_edit_f2.gif');", "if (RevChecks.itemChecked()) swap('review_edit', 'toolbar/tool_edit.gif');","if (RevChecks.itemChecked()) RevChecks.check_submit('addreview', '');", "tool_edit.gif"); $listImages[] = "RevChecks.addImage('review_edit','$imagesURL/toolbar/tool_edit.gif','$imagesURL/toolbar/tool_edit_f3.gif',1); "; $objListToolBar->Add("review_del","la_ToolTip_Delete","#", "if (RevChecks.itemChecked()) swap('review_del','toolbar/tool_delete_f2.gif');", "if (RevChecks.itemChecked()) swap('review_del', 'toolbar/tool_delete.gif');","if (RevChecks.itemChecked()) RevChecks.check_submit('addarticle_reviews', 'm_review_delete');", "tool_delete.gif"); $listImages[] = "RevChecks.addImage('review_del','$imagesURL/toolbar/tool_delete.gif','$imagesURL/toolbar/tool_delete_f3.gif',1); "; $objListToolBar->Add("divider"); $objListToolBar->Add("rev_move_up","la_ToolTip_Move_Up","#", "if (RevChecks.itemChecked()) swap('rev_move_up','toolbar/tool_move_up_f2.gif');", "if (RevChecks.itemChecked()) swap('rev_move_up', 'toolbar/tool_move_up.gif');","if (RevChecks.itemChecked()) RevChecks.check_submit('addarticle_reviews', 'm_review_move_up');", "tool_move_up.gif"); $listImages[] = "RevChecks.addImage('rev_move_up','$imagesURL/toolbar/tool_move_up.gif','$imagesURL/toolbar/tool_move_up_f3.gif',1); "; $objListToolBar->Add("rev_move_down","la_ToolTip_Move_Down","#", "if (RevChecks.itemChecked()) swap('rev_move_down','toolbar/tool_move_down_f2.gif');", "if (RevChecks.itemChecked()) swap('rev_move_down', 'toolbar/tool_move_down.gif');","if (RevChecks.itemChecked()) RevChecks.check_submit('addarticle_reviews', 'm_review_move_down');", "tool_move_down.gif"); $listImages[] = "RevChecks.addImage('rev_move_down','$imagesURL/toolbar/tool_move_down.gif','$imagesURL/toolbar/tool_move_down_f3.gif',1); "; $objListToolBar->Add("divider"); $objListToolBar->Add("viewmenubutton", "la_ToolTip_View","#","swap('viewmenubutton','toolbar/tool_view_f2.gif'); ", "swap('viewmenubutton', 'toolbar/tool_view.gif');", "ShowViewMenu();","tool_view.gif"); $objListToolBar->AddToInitScript($listImages); $objListToolBar->AddToInitScript("fwLoadMenus(); \n"); // For filter warning $Bit_Pending=4; $Bit_Disabled=2; $Bit_Valid=1; $Bit_All = 7; /* determine current view menu settings */ $UserView = $objConfig->Get("NewsRev_View"); if(!is_numeric($UserView)) { $UserView = $Bit_All; //Set all bits ON $UserFilter = ""; } $filter = false; // always initialize variables before use if($objSession->GetVariable("NewsRevSearchWord") != '') { $filter = true; } else { if ($UserView != $Bit_All) { $filter = true; } } $title = prompt_language("la_Text_Editing")." ".prompt_language("la_Text_Article")." '".$c->Get("Title")."' - ".prompt_language("la_tab_Reviews"); int_header($objListToolBar,NULL, $title); if ($objSession->GetVariable("HasChanges") == 1) { ?>