Page Menu
Home
In-Portal Phabricator
Search
Configure Global Search
Log In
Files
F1207131
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
Sat, Nov 8, 9:59 AM
Size
10 KB
Mime Type
text/x-diff
Expires
Mon, Nov 10, 9:59 AM (2 h, 49 m)
Engine
blob
Format
Raw Data
Handle
788366
Attached To
rINP In-Portal
in-portal
View Options
Index: trunk/admin/config/addcustomfield.php
===================================================================
--- trunk/admin/config/addcustomfield.php (revision 2452)
+++ trunk/admin/config/addcustomfield.php (revision 2453)
@@ -1,261 +1,261 @@
<?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;
//print_r($_GET);
//print_r($_POST);
require_once($pathtoroot."kernel/startup.php");
//admin only util
/* set the destination of the image upload, relative to the root path */
$DestDir = "kernel/images/";
$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";
$cssURL = $adminURL."/include";
$browseURL = $adminURL."/browse";
$pathtolocal = $pathtoroot."kernel/";
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."/browse/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);
}
}
$FieldType = (int)$_GET["DataType"];
if($FieldType==0)
$FieldType = (int)$_POST["DataType"];
$objCustomFields = new clsCustomFieldList($FieldType);
//$objEditItems->SourceTable = $objSession->GetEditTable("Images");
if(isset($_POST["itemlist"]))
{
if(is_array($_POST["itemlist"]))
{
$FieldId = $_POST["itemlist"][0];
}
else
{
$FieldId = $_POST["itemlist"];
}
$c = $objCustomFields->GetItem($FieldId);
$action = "m_customfield_edit";
$name = $c->Get("FieldName");
}
else
{
$c = new clsCustomField();
$c->Set("Type",$DataType);
$action = "m_customfield_add";
$name = prompt_language("la_Text_NewField");
}
$section = $_GET["section"];
if(strlen($section)==0)
$section = $_POST["section"];
$section_env = "section=$section&DataType=$FieldType";
$envar = "$section_env&env=".BuildEnv();
$ado = &GetADODBConnection();
/* page header */
$charset = GetRegionalOption('Charset');
print <<<END
<html>
<head>
<title>In-portal</title>
<meta http-equiv="content-type" content="text/html;charset=$charset">
<meta http-equiv="Pragma" content="no-cache">
<script language="JavaScript">
imagesPath='$imagesURL'+'/';
</script>
<script src="$browseURL/common.js"></script>
<script src="$browseURL/toolbar.js"></script>
<script src="$browseURL/utility.js"></script>
<script src="$browseURL/checkboxes.js"></script>
<script language="JavaScript1.2" src="$browseURL/fw_menu.js"></script>
<link rel="stylesheet" type="text/css" href="$browseURL/checkboxes.css">
<link rel="stylesheet" type="text/css" href="$cssURL/style.css">
<link rel="stylesheet" type="text/css" href="$browseURL/toolbar.css">
END;
$title = GetTitle("la_Text_CustomField", '', $FieldId, $name);//prompt_language("la_Text_Editing")." ".prompt_language("la_Text_CustomField")." ".prompt_language("la_text_for")." ".prompt_language("la_Text_DataType_".$_GET["DataType"]);
$title .= " ".prompt_language("la_text_for")." ".prompt_language("la_Text_DataType_".$_GET["DataType"]);
$objCatToolBar = new clsToolBar();
$objCatToolBar->Add("img_save", "la_Save","#","swap('img_save','toolbar/tool_select_f2.gif');", "swap('img_save', 'toolbar/tool_select.gif');","submit_form('customfield','','".$admin."/config/edit_customfields.php',0,'&$section_env');",$imagesURL."/toolbar/tool_select.gif");
$objCatToolBar->Add("img_cancel", "la_Cancel","#","swap('img_cancel','toolbar/tool_cancel_f2.gif');", "swap('img_cancel', 'toolbar/tool_cancel.gif');","submit_form('customfield','','".$admin."/config/edit_customfields.php',-1,'&$section_env');",$imagesURL."/toolbar/tool_cancel.gif");
int_header($objCatToolBar,NULL,$title);
?>
<FORM enctype="multipart/form-data" ID="customfield" NAME="customfield" method="POST" ACTION="">
<TABLE cellSpacing="0" cellPadding="2" width="100%" class="tableborder">
<?php int_subsection_title(prompt_language("la_tab_General")); ?>
<TR <?php int_table_color(); ?> >
<TD><?php echo prompt_language("la_prompt_FieldId"); ?></TD>
<TD><?php echo $c->Get("CustomFieldId"); ?></TD>
<TD></TD>
</TR>
<TR <?php int_table_color(); ?> >
<TD><SPAN id="prompt_fieldname"><?php echo prompt_language("la_prompt_FieldName"); ?></SPAN></TD>
<TD><input ValidationType="custom_name" tabindex="1" type=text NAME="fieldname" VALUE="<?php echo $c->Get("FieldName"); ?>"></TD>
<TD></TD>
</TR>
<TR <?php int_table_color(); ?> >
<TD><SPAN id="prompt_fieldlabel"><?php echo prompt_language("la_prompt_FieldLabel"); ?></SPAN></TD>
<td><?php if(strlen($c->Get("FieldName"))) echo "lu_fieldcustom__".$c->Get("FieldName"); ?>:
<?php echo prompt_language("lu_fieldcustom__".$c->Get("FieldName"),0); ?>
</td>
<TD></TD>
</TR>
<TR <?php int_table_color(); ?> >
<td colspan="3">
<input type=hidden NAME="Action" VALUE="<?php echo $action; ?>">
<INPUT TYPE="hidden" NAME="CustomFieldId" VALUE="<?php echo $c->Get("CustomFieldId"); ?>">
<input TYPE="HIDDEN" NAME="DataType" VALUE="<?php echo $_GET["DataType"]; ?>">
</td>
</tr>
<?php int_subsection_title(prompt_language("la_tab_AdminUI")); ?>
<TR <?php int_table_color(); ?> >
<TD><SPAN id="prompt_generaltab"><?php echo prompt_language("la_prompt_showgeneraltab"); ?></SPAN></TD>
<TD><input type=checkbox NAME="generaltab" tabindex="2" VALUE="1" <?php if ($c->Get("OnGeneralTab")) echo "CHECKED"; ?>></TD>
<TD></TD>
</TR>
<TR <?php int_table_color(); ?> >
<TD><SPAN id="prompt_heading"><?php echo prompt_language("la_prompt_heading"); ?></SPAN></TD>
<TD><input type=text NAME="heading" tabindex="3" VALUE="<?php echo $c->Get("Heading"); ?>"></TD>
<TD></TD>
</TR>
<TR <?php int_table_color(); ?> >
<TD><SPAN id="prompt_fieldprompt"><?php echo prompt_language("la_prompt_FieldPrompt"); ?></SPAN></TD>
<TD><input type=text NAME="fieldprompt" tabindex="4" VALUE="<?php echo $c->Get("Prompt"); ?>"></TD>
<TD></TD>
</TR>
<TR <?php int_table_color(); ?> >
<TD><SPAN id="prompt_input_type"><?php echo prompt_language("la_prompt_InputType"); ?></SPAN></TD>
<td>
<SELECT name="input_type" tabindex="5">
<option VALUE="text" <?php if($c->Get("ElementType")=="text") echo "SELECTED"; ?>><?php echo admin_language("la_type_text"); ?></OPTION>
<option VALUE="select" <?php if($c->Get("ElementType")=="select") echo "SELECTED"; ?>><?php echo admin_language("la_type_select"); ?></OPTION>
<option VALUE="radio" <?php if($c->Get("ElementType")=="radio") echo "SELECTED"; ?>><?php echo admin_language("la_type_radio"); ?></OPTION>
<option VALUE="password" <?php if($c->Get("ElementType")=="password") echo "SELECTED"; ?>><?php echo admin_language("la_type_password"); ?></OPTION>
<option VALUE="textarea" <?php if($c->Get("ElementType")=="textarea") echo "SELECTED"; ?>><?php echo admin_language("la_type_textarea"); ?></OPTION>
<option VALUE="label" <?php if($c->Get("ElementType")=="label") echo "SELECTED"; ?>><?php echo admin_language("la_type_label"); ?></OPTION>
</SELECT>
</td>
<td></td>
</TR>
<TR <?php int_table_color(); ?> >
<TD><SPAN id="prompt_valuelist"><?php echo prompt_language("la_prompt_valuelist"); ?></SPAN></TD>
- <TD><input type=text tabindex="6" NAME="valuelist" VALUE="<?php echo $c->Get("ValueList"); ?>"></TD>
+ <TD><input type=text tabindex="6" NAME="valuelist" VALUE="<?php echo htmlspecialchars( $c->Get("ValueList") ); ?>"></TD>
<TD></TD>
</TR>
<TR <?php int_table_color(); ?> >
<TD></TD>
<td><?php echo prompt_language("la_valuelist_help"); ?></td>
<td></td>
</tr>
</FORM>
</TABLE>
<!-- CODE FOR VIEW MENU -->
<form method="post" action="user_groups.php?<?php echo $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>
<!-- END CODE-->
<?php int_footer(); ?>
Property changes on: trunk/admin/config/addcustomfield.php
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.6
\ No newline at end of property
+1.7
\ No newline at end of property
Event Timeline
Log In to Comment