Page Menu
Home
In-Portal Phabricator
Search
Configure Global Search
Log In
Files
F1173412
in-portal
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Wed, Oct 1, 4:04 AM
Size
9 KB
Mime Type
text/x-diff
Expires
Fri, Oct 3, 4:04 AM (1 d, 17 h)
Engine
blob
Format
Raw Data
Handle
760609
Attached To
rINP In-Portal
in-portal
View Options
Index: trunk/admin/category/addcategory_custom.php
===================================================================
--- trunk/admin/category/addcategory_custom.php (revision 671)
+++ trunk/admin/category/addcategory_custom.php (revision 672)
@@ -1,516 +1,264 @@
<?php
-
##############################################################
-
##In-portal ##
-
##############################################################
-
## In-portal ##
-
## Intechnic Corporation ##
-
## All Rights Reserved, 1998-2002 ##
-
## ##
-
## No portion of this code may be copied, reproduced or ##
-
## otherwise redistributed without proper written ##
-
## consent of Intechnic Corporation. Violation will ##
-
## result in revocation of the license and support ##
-
## privileges along maximum prosecution allowed by law. ##
-
##############################################################
-
if(!strlen($pathtoroot))
-
{
-
$path=dirname(realpath(__FILE__));
-
if(strlen($path))
-
{
-
/* determine the OS type for path parsing */
-
$pos = strpos($path,":");
-
if ($pos === false)
-
{
-
$gOS_TYPE="unix";
-
$pathchar = "/";
-
}
-
else
-
{
-
$gOS_TYPE="win";
-
$pathchar="\\";
-
}
-
$p = $path.$pathchar;
-
/*Start looking for the root flag file */
-
while(!strlen($pathtoroot) && strlen($p))
-
{
-
$sub = substr($p,strlen($pathchar)*-1);
-
if($sub==$pathchar)
-
{
-
$filename = $p."root.flg";
-
}
-
else
-
$filename = $p.$pathchar."root.flg";
-
if(file_exists($filename))
-
{
-
$pathtoroot = $p;
-
}
-
else
-
{
-
$parent = realpath($p.$pathchar."..".$pathchar);
-
if($parent!=$p)
-
{
-
$p = $parent;
-
}
-
else
-
$p = "";
-
}
-
}
-
if(!strlen($pathtoroot))
-
$pathtoroot = ".".$pathchar;
-
}
-
else
-
{
-
$pathtoroot = ".".$pathchar;
-
}
-
}
-
-
$sub = substr($pathtoroot,strlen($pathchar)*-1);
-
if($sub!=$pathchar)
-
{
-
$pathtoroot = $pathtoroot.$pathchar;
-
}
-
//echo $pathtoroot;
-
-
require_once($pathtoroot."kernel/startup.php");
-
//admin only util
-
$rootURL="http://".ThisDomain().$objConfig->Get("Site_Path");
-
-
$admin = $objConfig->Get("AdminDirectory");
-
if(!strlen($admin))
-
$admin = "admin";
-
-
$localURL=$rootURL."kernel/";
-
$adminURL = $rootURL.$admin;
-
$imagesURL = $adminURL."/images";
-
-
//$pathtolocal = $pathtoroot."in-news/";
-
require_once ($pathtoroot.$admin."/include/elements.php");
-
require_once ($pathtoroot."kernel/admin/include/navmenu.php");
-
//require_once ($pathtolocal."admin/include/navmenu.php");
-
require_once($pathtoroot.$admin."/toolbar.php");
-
require_once($pathtoroot.$admin."/listview/listview.php");
-
-
$m = GetModuleArray();
-
foreach($m as $key=>$value)
-
-
{
-
$path = $pathtoroot. $value."admin/include/parser.php";
-
if(file_exists($path))
-
{
-
include_once($path);
-
}
-
}
-
unset($objEditItems);
-
-
$objEditItems = new clsCatList();
-
$objEditItems->SourceTable = $objSession->GetEditTable("Category");
-
-
//Multiedit init
-
$en = (int)$_GET["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;
-
}
-
$action = "m_edit_category";
-
-
$envar = "env=" . BuildEnv() . "&en=$en";
-
-
$section = 'in-portal:editcategory_custom';
-
-
$title = admin_language("la_Text_Editing")." ".admin_language("la_Text_Category")." '".$c->Get("Name")."' - ".admin_language("la_tab_Custom");
-
-
$formaction = $rootURL.$admin."/category/addcategory_custom.php?".$envar;
-
-
//echo $envar."<br>\n";
-
-
//Display header
-
$sec = $objSections->GetSection($section);
-
$objCatToolBar = new clsToolBar();
-
-
$ListForm = "permlistform";
-
$CheckClass = "PermChecks";
-
$objCatToolBar->Set("CheckClass",$CheckClass);
-
$objCatToolBar->Set("CheckForm",$ListForm);
-
-
$saveURL = $admin."/category/category_maint.php";
-
$cancelURL = $admin."/".$objSession->GetVariable('ReturnScript');
-
$objCatToolBar->Add("img_save", "la_Save","#","swap('img_save','toolbar/tool_select_f2.gif');", "swap('img_save', 'toolbar/tool_select.gif');","do_edit_save('category','CatEditStatus','$saveURL',1);","tool_select.gif");
-
$objCatToolBar->Add("img_cancel", "la_Cancel","#","swap('img_cancel','toolbar/tool_cancel_f2.gif');", "swap('img_cancel', 'toolbar/tool_cancel.gif');","do_edit_save('category','CatEditStatus','".$cancelURL."',2);","tool_cancel.gif");
-
-
if ( isset($en_prev) || isset($en_next) )
-
{
-
$url = $RootUrl.$admin."/category/addcategory_custom.php";
-
$StatusField = "CatEditStatus";
-
$form = "category";
-
MultiEditButtons($objCatToolBar,$en_next,$en_prev,$form,$StatusField,$url,$sec->Get("OnClick"),'','la_PrevCategory','la_NextCategory');
-
}
-
-
int_header($objCatToolBar,NULL,$title);
-
-
if ($objSession->GetVariable("HasChanges") == 1) {
-
?>
-
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="toolbar">
-
<tr>
-
<td valign="top">
-
<?php int_hint_red(admin_language("la_Warning_Save_Item")); ?>
-
</td>
-
</tr>
-
</table>
-
<?php } ?>
-
<form id="category" name="category" action="" method=POST>
-
<?php
-
-
$objCustomFields = new clsCustomFieldList(1);
-
-
$objCustomDataList->SourceTable = $objSession->GetEditTable("CustomMetaData");
-
$objCustomDataList->LoadResource($c->Get("ResourceId"));
-
-
for($i=0;$i<$objCustomFields->NumItems(); $i++)
-
{
-
$field =& $objCustomFields->GetItemRefByIndex($i);
-
$fieldid = $field->Get("CustomFieldId");
-
-
$f = $objCustomDataList->GetDataItem($fieldid);
-
$fieldname = "CustomData[$fieldid]";
-
if(is_object($f))
-
{
-
$val_field = "<input type=\"text\" tabindex=\"".($i+1)."\" VALUE=\"".inp_htmlize($f->Get("Value"))."\" name=\"$fieldname\">";
-
$field->Set("Value", $val_field);
if ($field->Get('Prompt') != '') {
$field->Set("FieldLabel", admin_language($field->Get('Prompt')));
}
else {
$field->Set("FieldLabel", admin_language('lu_fieldcustom__'.strtolower($field->Get('FieldName'))));
}
-
$field->Set("DataId",$f->Get("CustomDataId"));
-
}
-
else
-
{
-
$val_field = "<input type=text tabindex=\"".($i+1)."\" VALUE=\"\" name=\"$fieldname\">";
-
$field->Set("Value", $val_field);
-
if ($field->Get('Prompt') != '') {
$field->Set("FieldLabel", admin_language($field->Get('Prompt')));
}
else {
$field->Set("FieldLabel", admin_language('lu_fieldcustom__'.strtolower($field->Get('FieldName'))));
}
-
$field->Set("DataId",0);
-
}
-
}
-
$objCustomFields->SortField = $objConfig->Get("CustomData_LV_Sortfield");;
-
$objCustomFields->SortItems($objConfig->Get("CustomData_LV_Sortorder")!="desc");
-
-
$objListView = new clsListView($objCatToolBar,$objCustomFields);
-
$objListView->IdField = "DataId";
-
-
$order = $objConfig->Get("CustomData_LV_Sortfield");
-
$SortOrder=0;
-
if($objConfig->Get("CustomData_LV_Sortorder")=="asc")
-
$SortOrder=1;
-
-
$objListView->ColumnHeaders->Add("FieldName",admin_language("la_ColHeader_FieldName"),1,0,$order,"width=\"30%\"","CustomData_LV_Sortfield","CustomData_LV_Sortorder","FieldName");
-
$objListView->ColumnHeaders->Add("FieldLabel",admin_language("la_ColHeader_FieldLabel"),1,0,$order,"width=\"30%\"","CustomData_LV_Sortfield","CustomData_LV_Sortorder","FieldLabel");
-
$objListView->ColumnHeaders->Add("Value",admin_language("la_ColHeader_Value"),1,0,$order,"width=\"40%\"","CustomData_LV_Sortfield","CustomData_LV_Sortorder","Value");
-
-
$objListView->ColumnHeaders->SetSort($objConfig->Get("CustomData_LV_Sortfield"), $objConfig->Get("CustomData_LV_Sortorder"));
-
-
$objListView->PrintToolBar = FALSE;
-
$objListView->checkboxes = FALSE;
-
-
$objListView->CurrentPageVar = "Page_CustomData";
-
$objListView->PerPageVar = "Perpage_CustomData";
-
//$objListView->CheckboxName = "itemlist[]";
-
-
for($i=0;$i<count($objCustomFields->Items);$i++)
-
{
-
$objListView->RowIcons[] = $imagesURL."/itemicons/icon16_custom.gif";
-
}
-
$objListView->PageLinks = $objListView->PrintPageLinks();
-
-
$objListView->SliceItems();
-
print $objListView->PrintList();
-
?>
-
<input type="hidden" name="ItemId" value="<?php echo $c->Get("ResourceId"); ?>">
-
<input type="hidden" name="Action" value="m_edit_custom_data">
-
<input type="hidden" name="CatEditStatus" VALUE="0">
-
</FORM>
-
-
-
<FORM id="save_edit" method="POST" NAME="save_edit" ID="save_edit">
-
<input type="hidden" name="CatEditStatus" VALUE="0">
-
</FORM>
-
<!-- CODE FOR VIEW MENU -->
-
<form ID="viewmenu" method="post" action="<?php echo $_SERVER["PHP_SELF"]."?".$envar; ?>" name="viewmenu">
-
<input type="hidden" name="fieldname" value="">
-
<input type="hidden" name="varvalue" value="">
-
<input type="hidden" name="varvalue2" value="">
-
<input type="hidden" name="Action" value="">
-
</form>
-
-
<?php int_footer(); ?>
-
Property changes on: trunk/admin/category/addcategory_custom.php
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.7
\ No newline at end of property
+1.8
\ No newline at end of property
Event Timeline
Log In to Comment