mirror of
https://github.com/e107inc/e107.git
synced 2025-08-10 08:34:09 +02:00
content: templated admin area, fixed IE7 bug on dropdowns
This commit is contained in:
@@ -1028,5 +1028,663 @@ return $CONTENT_PDF_IMAGES;
|
||||
}
|
||||
SC_END
|
||||
|
||||
|
||||
//##### ADMIN PAGE --------------------------------------------------
|
||||
|
||||
SC_BEGIN CONTENT_ID
|
||||
global $row;
|
||||
return $row['content_id'];
|
||||
SC_END
|
||||
|
||||
SC_BEGIN CONTENT_CAT_ICON
|
||||
global $row, $content_pref, $tp;
|
||||
$content_cat_icon_path_large = $tp -> replaceConstants($content_pref["content_cat_icon_path_large"]);
|
||||
//$content_cat_icon_path_small = $tp -> replaceConstants($content_pref["content_cat_icon_path_small"]);
|
||||
$caticon = $content_cat_icon_path_large.$row['content_icon'];
|
||||
return ($row['content_icon'] ? "<img src='".$caticon."' alt='' style='vertical-align:middle' />" : " ");
|
||||
SC_END
|
||||
|
||||
SC_BEGIN CONTENT_ICON
|
||||
global $CONTENT_ICON;
|
||||
return $CONTENT_ICON;
|
||||
SC_END
|
||||
|
||||
SC_BEGIN CONTENT_AUTHOR
|
||||
global $row, $aa;
|
||||
$authordetails = $aa -> getAuthor($row['content_author']);
|
||||
return ($authordetails[0] != "0" ? "<a href='".e_BASE."user.php?id.".$authordetails[0]."'>".CONTENT_ICON_USER."</a>" : "")." ".$authordetails[1];
|
||||
SC_END
|
||||
|
||||
SC_BEGIN CONTENT_HEADING
|
||||
global $row, $tp;
|
||||
return $tp->toHTML($row['content_heading'], TRUE, "");
|
||||
SC_END
|
||||
|
||||
SC_BEGIN CONTENT_SUBHEADING
|
||||
global $row, $tp;
|
||||
$row['content_subheading'] = $tp->toHTML($row['content_subheading'], TRUE, "");
|
||||
return ($row['content_subheading'] ? "[".$row['content_subheading']."]" : "");
|
||||
SC_END
|
||||
|
||||
SC_BEGIN CONTENT_LINK_ITEM
|
||||
global $row, $plugindir;
|
||||
return "<a href='".$plugindir."content.php?content.".$row['content_id']."'>".CONTENT_ICON_LINK."</a> ";
|
||||
SC_END
|
||||
|
||||
SC_BEGIN CONTENT_LINK_CATEGORY
|
||||
global $row, $plugindir;
|
||||
return "<a href='".$plugindir."content.php?cat.".$row['content_id']."'>".CONTENT_ICON_LINK."</a>";
|
||||
SC_END
|
||||
|
||||
SC_BEGIN CONTENT_LINK_OPTION
|
||||
global $row;
|
||||
return "<a href='".e_SELF."?option.".$row['content_id']."'>".CONTENT_ICON_OPTIONS."</a>";
|
||||
SC_END
|
||||
|
||||
SC_BEGIN CONTENT_INHERIT
|
||||
global $row, $content_pref;
|
||||
return "<input type='checkbox' value='1' name='content_inherit[".$row['content_id']."]' ".(isset($content_pref['content_inherit']) && $content_pref['content_inherit']=='1' ? "checked='checked'" : "")." /><input type='hidden' name='id[".$row['content_id']."]' value='1' />";
|
||||
SC_END
|
||||
|
||||
SC_BEGIN CONTENT_LINK_MANAGER
|
||||
global $row;
|
||||
return "<a href='".e_SELF."?manager.".intval($row['content_id'])."'>".CONTENT_ICON_CONTENTMANAGER_SMALL."</a>";
|
||||
SC_END
|
||||
|
||||
SC_BEGIN CONTENT_MANAGER_PRE
|
||||
global $row, $catarray, $catid;
|
||||
$pre = '';
|
||||
if($row['content_parent'] != "0"){
|
||||
for($b=0;$b<(count($catarray[$catid])/2)-1;$b++){
|
||||
$pre .= "_";
|
||||
}
|
||||
}
|
||||
return $pre;
|
||||
SC_END
|
||||
|
||||
SC_BEGIN CONTENT_ADMIN_HTML_CLASS
|
||||
global $row;
|
||||
if($row['content_parent'] == "0"){
|
||||
//top level
|
||||
$class = "forumheader";
|
||||
}else{
|
||||
//sub level
|
||||
$class = "forumheader3";
|
||||
}
|
||||
return $class;
|
||||
SC_END
|
||||
|
||||
SC_BEGIN CONTENT_ADMIN_MANAGER_APPROVE
|
||||
global $row;
|
||||
return r_userclass("content_manager_approve", $content_pref["content_manager_approve"], 'off', "public,guest,nobody,member,admin,classes");
|
||||
SC_END
|
||||
|
||||
SC_BEGIN CONTENT_ADMIN_MANAGER_PERSONAL
|
||||
global $row;
|
||||
return r_userclass("content_manager_personal", $content_pref["content_manager_personal"], 'off', "public,guest,nobody,member,admin,classes");
|
||||
SC_END
|
||||
|
||||
SC_BEGIN CONTENT_ADMIN_MANAGER_CATEGORY
|
||||
global $row;
|
||||
return r_userclass("content_manager_category", $content_pref["content_manager_category"], 'off', "public,guest,nobody,member,admin,classes");
|
||||
SC_END
|
||||
|
||||
SC_BEGIN CONTENT_ORDER
|
||||
global $row;
|
||||
return $row['content_order'];
|
||||
SC_END
|
||||
|
||||
SC_BEGIN CONTENT_ADMIN_CATEGORY
|
||||
global $CONTENT_ADMIN_CATEGORY;
|
||||
return $CONTENT_ADMIN_CATEGORY;
|
||||
SC_END
|
||||
|
||||
SC_BEGIN CONTENT_ADMIN_OPTIONS
|
||||
global $CONTENT_ADMIN_OPTIONS;
|
||||
return $CONTENT_ADMIN_OPTIONS;
|
||||
SC_END
|
||||
|
||||
SC_BEGIN CONTENT_ADMIN_BUTTON
|
||||
global $CONTENT_ADMIN_BUTTON;
|
||||
return $CONTENT_ADMIN_BUTTON;
|
||||
SC_END
|
||||
|
||||
SC_BEGIN CONTENT_ADMIN_SPACER
|
||||
global $CONTENT_ADMIN_SPACER;
|
||||
return $CONTENT_ADMIN_SPACER;
|
||||
SC_END
|
||||
|
||||
SC_BEGIN CONTENT_ADMIN_FORM_TARGET
|
||||
global $CONTENT_ADMIN_FORM_TARGET;
|
||||
return $CONTENT_ADMIN_FORM_TARGET;
|
||||
SC_END
|
||||
|
||||
SC_BEGIN CONTENT_ADMIN_ORDER_SELECT
|
||||
global $CONTENT_ADMIN_ORDER_SELECT;
|
||||
return $CONTENT_ADMIN_ORDER_SELECT;
|
||||
SC_END
|
||||
|
||||
SC_BEGIN CONTENT_ADMIN_ORDER_UPDOWN
|
||||
global $CONTENT_ADMIN_ORDER_UPDOWN;
|
||||
return $CONTENT_ADMIN_ORDER_UPDOWN;
|
||||
SC_END
|
||||
|
||||
SC_BEGIN CONTENT_ADMIN_ORDER_AMOUNT
|
||||
global $CONTENT_ADMIN_ORDER_AMOUNT;
|
||||
return $CONTENT_ADMIN_ORDER_AMOUNT;
|
||||
SC_END
|
||||
|
||||
SC_BEGIN CONTENT_ADMIN_ORDER_CAT
|
||||
global $CONTENT_ADMIN_ORDER_CAT;
|
||||
return $CONTENT_ADMIN_ORDER_CAT;
|
||||
SC_END
|
||||
|
||||
SC_BEGIN CONTENT_ADMIN_ORDER_CATALL
|
||||
global $CONTENT_ADMIN_ORDER_CATALL;
|
||||
return $CONTENT_ADMIN_ORDER_CATALL;
|
||||
SC_END
|
||||
|
||||
SC_BEGIN CONTENT_ADMIN_LETTERINDEX
|
||||
global $CONTENT_ADMIN_LETTERINDEX;
|
||||
return $CONTENT_ADMIN_LETTERINDEX;
|
||||
SC_END
|
||||
|
||||
//##### CONTENT CATEGORY CREATE FORM -------------------------
|
||||
|
||||
SC_BEGIN CATFORM_CATEGORY
|
||||
global $CATFORM_CATEGORY;
|
||||
return $CATFORM_CATEGORY;
|
||||
SC_END
|
||||
|
||||
SC_BEGIN CATFORM_HEADING
|
||||
global $row, $rs;
|
||||
return $rs -> form_text("cat_heading", 90, $row['content_heading'], 250);
|
||||
SC_END
|
||||
|
||||
SC_BEGIN CATFORM_SUBHEADING
|
||||
global $row, $rs, $show;
|
||||
if($show['subheading']===true){
|
||||
return $rs -> form_text("cat_subheading", 90, $row['content_subheading'], 250);
|
||||
}
|
||||
SC_END
|
||||
|
||||
SC_BEGIN CATFORM_TEXT
|
||||
global $row, $rs, $show, $pref;
|
||||
require_once(e_HANDLER."ren_help.php");
|
||||
$insertjs = (!$pref['wysiwyg'] ? "onselect='storeCaret(this);' onclick='storeCaret(this);' onkeyup='storeCaret(this);'" : "");
|
||||
$text = $rs -> form_textarea("cat_text", 80, 20, $row['content_text'], $insertjs)."<br />";
|
||||
if (!$pref['wysiwyg']) { $text .= $rs -> form_text("helpb", 90, '', '', "helpbox")."<br />". display_help("helpb"); }
|
||||
return $text;
|
||||
SC_END
|
||||
|
||||
SC_BEGIN CATFORM_DATESTART
|
||||
global $row, $rs, $show, $months, $ne_day, $ne_month, $ne_year, $current_year;
|
||||
if($show['startdate']===true){
|
||||
$text = "
|
||||
".$rs -> form_select_open("ne_day")."
|
||||
".$rs -> form_option(CONTENT_ADMIN_DATE_LAN_12, 0, "none");
|
||||
for($count=1; $count<=31; $count++){
|
||||
$text .= $rs -> form_option($count, ($ne_day == $count ? "1" : "0"), $count);
|
||||
}
|
||||
$text .= $rs -> form_select_close()."
|
||||
".$rs -> form_select_open("ne_month")."
|
||||
".$rs -> form_option(CONTENT_ADMIN_DATE_LAN_13, 0, "none");
|
||||
for($count=1; $count<=12; $count++){
|
||||
$text .= $rs -> form_option($months[($count-1)], ($ne_month == $count ? "1" : "0"), $count);
|
||||
}
|
||||
$text .= $rs -> form_select_close()."
|
||||
".$rs -> form_select_open("ne_year")."
|
||||
".$rs -> form_option(CONTENT_ADMIN_DATE_LAN_14, 0, "none");
|
||||
for($count=($current_year-5); $count<=$current_year; $count++){
|
||||
$text .= $rs -> form_option($count, ($ne_year == $count ? "1" : "0"), $count);
|
||||
}
|
||||
$text .= $rs -> form_select_close();
|
||||
return $text;
|
||||
}
|
||||
SC_END
|
||||
|
||||
SC_BEGIN CATFORM_DATEEND
|
||||
global $row, $rs, $show, $months, $end_day, $end_month, $end_year, $current_year;
|
||||
if($show['enddate']===true){
|
||||
$text = "
|
||||
".$rs -> form_select_open("end_day")."
|
||||
".$rs -> form_option(CONTENT_ADMIN_DATE_LAN_12, 1, "none");
|
||||
for($count=1; $count<=31; $count++){
|
||||
$text .= $rs -> form_option($count, ($end_day == $count ? "1" : "0"), $count);
|
||||
}
|
||||
$text .= $rs -> form_select_close()."
|
||||
".$rs -> form_select_open("end_month")."
|
||||
".$rs -> form_option(CONTENT_ADMIN_DATE_LAN_13, 1, "none");
|
||||
for($count=1; $count<=12; $count++){
|
||||
$text .= $rs -> form_option($months[($count-1)], ($end_month == $count ? "1" : "0"), $count);
|
||||
}
|
||||
$text .= $rs -> form_select_close()."
|
||||
".$rs -> form_select_open("end_year")."
|
||||
".$rs -> form_option(CONTENT_ADMIN_DATE_LAN_14, 1, "none");
|
||||
for($count=($current_year-5); $count<=$current_year; $count++){
|
||||
$text .= $rs -> form_option($count, ($end_year == $count ? "1" : "0"), $count);
|
||||
}
|
||||
$text .= $rs -> form_select_close();
|
||||
return $text;
|
||||
}
|
||||
SC_END
|
||||
|
||||
SC_BEGIN CATFORM_UPLOAD
|
||||
global $row, $show, $content_cat_icon_path_large, $content_cat_icon_path_small;
|
||||
if($show['uploadicon']===true){
|
||||
$text='';
|
||||
if(!FILE_UPLOADS){
|
||||
$text = "<b>".CONTENT_ADMIN_ITEM_LAN_21."</b>";
|
||||
}else{
|
||||
if(!is_writable($content_cat_icon_path_large)){
|
||||
$text = "<b>".CONTENT_ADMIN_ITEM_LAN_22." ".$content_cat_icon_path_large." ".CONTENT_ADMIN_ITEM_LAN_23."</b><br />";
|
||||
}
|
||||
$text .= CONTENT_ADMIN_CAT_LAN_62."
|
||||
<input class='tbox' type='file' name='file_userfile[]' size='58' />
|
||||
<input type='hidden' name='iconpathlarge' value='".$content_cat_icon_path_large."' />
|
||||
<input type='hidden' name='iconpathsmall' value='".$content_cat_icon_path_small."' />
|
||||
<input class='button' type='submit' name='uploadcaticon' value='".CONTENT_ADMIN_CAT_LAN_63."' />";
|
||||
}
|
||||
return $text;
|
||||
}
|
||||
SC_END
|
||||
|
||||
SC_BEGIN CATFORM_ICON
|
||||
global $row, $rs, $show, $fl, $content_cat_icon_path_large;
|
||||
if($show['selecticon']===true){
|
||||
$rejectlist = array('$.','$..','/','CVS','thumbs.db','Thumbs.db','*._$', 'index', 'null*');
|
||||
$iconlist = $fl->get_files($content_cat_icon_path_large,"",$rejectlist);
|
||||
$text = $rs -> form_text("cat_icon", 60, $row['content_icon'], 100)."
|
||||
".$rs -> form_button("button", '', CONTENT_ADMIN_CAT_LAN_8, "onclick=\"expandit('divcaticon')\"")."
|
||||
<div id='divcaticon' style='{head}; display:none'>";
|
||||
foreach($iconlist as $icon){
|
||||
$text .= "<a href=\"javascript:insertext('".$icon['fname']."','cat_icon','divcaticon')\"><img src='".$icon['path'].$icon['fname']."' style='border:0' alt='' /></a> ";
|
||||
}
|
||||
$text .= "</div>";
|
||||
return $text;
|
||||
}
|
||||
SC_END
|
||||
|
||||
SC_BEGIN CATFORM_COMMENT
|
||||
global $row, $rs, $show;
|
||||
if($show['comment']===true){
|
||||
return $rs -> form_radio("cat_comment", "1", ($row['content_comment'] ? "1" : "0"), "", "").CONTENT_ADMIN_ITEM_LAN_85." ".$rs -> form_radio("cat_comment", "0", ($row['content_comment'] ? "0" : "1"), "", "").CONTENT_ADMIN_ITEM_LAN_86;
|
||||
}
|
||||
SC_END
|
||||
|
||||
SC_BEGIN CATFORM_RATING
|
||||
global $row, $rs, $show;
|
||||
if($show['rating']===true){
|
||||
return $rs -> form_radio("cat_rate", "1", ($row['content_rate'] ? "1" : "0"), "", "").CONTENT_ADMIN_ITEM_LAN_85." ".$rs -> form_radio("cat_rate", "0", ($row['content_rate'] ? "0" : "1"), "", "").CONTENT_ADMIN_ITEM_LAN_86;
|
||||
}
|
||||
SC_END
|
||||
|
||||
SC_BEGIN CATFORM_PEICON
|
||||
global $row, $rs, $show;
|
||||
if($show['pe']===true){
|
||||
return $rs -> form_radio("cat_pe", "1", ($row['content_pe'] ? "1" : "0"), "", "").CONTENT_ADMIN_ITEM_LAN_85." ".$rs -> form_radio("cat_pe", "0", ($row['content_pe'] ? "0" : "1"), "", "").CONTENT_ADMIN_ITEM_LAN_86;
|
||||
}
|
||||
SC_END
|
||||
|
||||
SC_BEGIN CATFORM_VISIBILITY
|
||||
global $row, $show;
|
||||
if($show['visibility']===true){
|
||||
return r_userclass("cat_class",$row['content_class'], "CLASSES");
|
||||
}
|
||||
SC_END
|
||||
|
||||
//##### CONTENT CREATE FORM -------------------------
|
||||
|
||||
SC_BEGIN CONTENTFORM_CATEGORYSELECT
|
||||
global $CONTENTFORM_CATEGORYSELECT;
|
||||
return $CONTENTFORM_CATEGORYSELECT;
|
||||
SC_END
|
||||
|
||||
SC_BEGIN CONTENTFORM_CATEGORY
|
||||
global $CONTENTFORM_CATEGORY;
|
||||
return $CONTENTFORM_CATEGORY;
|
||||
SC_END
|
||||
|
||||
SC_BEGIN CONTENTFORM_HEADING
|
||||
global $row, $rs;
|
||||
return $rs -> form_text("content_heading", 74, $row['content_heading'], 250);
|
||||
SC_END
|
||||
|
||||
SC_BEGIN CONTENTFORM_SUBHEADING
|
||||
global $row, $rs, $show;
|
||||
if($show['subheading']===true){
|
||||
return $rs -> form_text("content_subheading", 74, $row['content_subheading'], 250);
|
||||
}
|
||||
SC_END
|
||||
|
||||
SC_BEGIN CONTENTFORM_SUMMARY
|
||||
global $row, $rs, $show;
|
||||
if($show['summary']===true){
|
||||
return $rs -> form_textarea("content_summary", 74, 5, $row['content_summary']);
|
||||
}
|
||||
SC_END
|
||||
|
||||
SC_BEGIN CONTENTFORM_TEXT
|
||||
global $row, $rs, $tp, $show, $pref;
|
||||
if(e_WYSIWYG){
|
||||
$row['content_text'] = $tp->replaceConstants($row['content_text'], true);
|
||||
}
|
||||
require_once(e_HANDLER."ren_help.php");
|
||||
$insertjs = (!e_WYSIWYG) ? "onselect='storeCaret(this);' onclick='storeCaret(this);' onkeyup='storeCaret(this);'": "";
|
||||
$text = $rs -> form_textarea("content_text", 74, 20, $row['content_text'], $insertjs)."<br />";
|
||||
if (!$pref['wysiwyg']) { $text .= $rs -> form_text("helpb", 90, '', '', "helpbox")."<br />".display_help("helpb"); }
|
||||
return $text;
|
||||
SC_END
|
||||
|
||||
SC_BEGIN CONTENTFORM_AUTHOR
|
||||
global $row, $rs, $show, $content_author_name_value, $content_author_name_js, $content_author_email_value, $content_author_email_js, $content_author_id;
|
||||
$text = "
|
||||
<table style='width:100%; text-align:left;'>
|
||||
<tr><td>".CONTENT_ADMIN_ITEM_LAN_14."</td><td>".$rs -> form_text("content_author_name", 70, $content_author_name_value, 100, "tbox", "", "", $content_author_name_js )."</td></tr>
|
||||
<tr><td>".CONTENT_ADMIN_ITEM_LAN_15."</td><td>".$rs -> form_text("content_author_email", 70, $content_author_email_value, 100, "tbox", "", "", $content_author_email_js )."
|
||||
".$rs -> form_hidden("content_author_id", $content_author_id)."
|
||||
</td></tr></table>";
|
||||
return $text;
|
||||
SC_END
|
||||
|
||||
SC_BEGIN CONTENTFORM_DATESTART
|
||||
global $row, $rs, $show, $months, $ne_day, $ne_month, $ne_year, $current_year;
|
||||
if($show['startdate']===true){
|
||||
$text = "
|
||||
".$rs -> form_select_open("ne_day")."
|
||||
".$rs -> form_option(CONTENT_ADMIN_DATE_LAN_12, 0, "none");
|
||||
for($count=1; $count<=31; $count++){
|
||||
$text .= $rs -> form_option($count, (isset($ne_day) && $ne_day == $count ? "1" : "0"), $count);
|
||||
}
|
||||
$text .= $rs -> form_select_close()."
|
||||
".$rs -> form_select_open("ne_month")."
|
||||
".$rs -> form_option(CONTENT_ADMIN_DATE_LAN_13, 0, "none");
|
||||
for($count=1; $count<=12; $count++){
|
||||
$text .= $rs -> form_option($months[($count-1)], (isset($ne_month) && $ne_month == $count ? "1" : "0"), $count);
|
||||
}
|
||||
$text .= $rs -> form_select_close()."
|
||||
".$rs -> form_select_open("ne_year")."
|
||||
".$rs -> form_option(CONTENT_ADMIN_DATE_LAN_14, 0, "none");
|
||||
for($count=($current_year-5); $count<=($current_year+1); $count++){
|
||||
$text .= $rs -> form_option($count, (isset($ne_year) && $ne_year == $count ? "1" : "0"), $count);
|
||||
}
|
||||
$text .= $rs -> form_select_close();
|
||||
return $text;
|
||||
}
|
||||
SC_END
|
||||
|
||||
SC_BEGIN CONTENTFORM_DATEEND
|
||||
global $row, $rs, $show, $months, $end_day, $end_month, $end_year, $current_year;
|
||||
if($show['enddate']===true){
|
||||
$text = "
|
||||
".$rs -> form_select_open("end_day")."
|
||||
".$rs -> form_option(CONTENT_ADMIN_DATE_LAN_12, 0, "none");
|
||||
for($count=1; $count<=31; $count++){
|
||||
$text .= $rs -> form_option($count, (isset($end_day) && $end_day == $count ? "1" : "0"), $count);
|
||||
}
|
||||
$text .= $rs -> form_select_close()."
|
||||
".$rs -> form_select_open("end_month")."
|
||||
".$rs -> form_option(CONTENT_ADMIN_DATE_LAN_13, 0, "none");
|
||||
for($count=1; $count<=12; $count++){
|
||||
$text .= $rs -> form_option($months[($count-1)], (isset($end_month) && $end_month == $count ? "1" : "0"), $count);
|
||||
}
|
||||
$text .= $rs -> form_select_close()."
|
||||
".$rs -> form_select_open("end_year")."
|
||||
".$rs -> form_option(CONTENT_ADMIN_DATE_LAN_14, 0, "none");
|
||||
for($count=($current_year-5); $count<=($current_year+1); $count++){
|
||||
$text .= $rs -> form_option($count, (isset($end_year) && $end_year == $count ? "1" : "0"), $count);
|
||||
}
|
||||
$text .= $rs -> form_select_close();
|
||||
return $text;
|
||||
}
|
||||
SC_END
|
||||
|
||||
SC_BEGIN CONTENTFORM_UPLOAD
|
||||
global $row, $rs, $show, $checkicon, $checkattach, $checkimages, $content_tmppath_icon, $content_tmppath_file, $content_tmppath_image;
|
||||
if($show['upload']===true){
|
||||
$text = "";
|
||||
if(!FILE_UPLOADS){
|
||||
$text .= "<b>".CONTENT_ADMIN_ITEM_LAN_21."</b>";
|
||||
}else{
|
||||
if(!is_writable($content_tmppath_icon)){
|
||||
$text .= "<b>".CONTENT_ADMIN_ITEM_LAN_22." ".$content_tmppath_icon." ".CONTENT_ADMIN_ITEM_LAN_23."</b><br />";
|
||||
}
|
||||
if(!is_writable($content_tmppath_file)){
|
||||
$text .= "<b>".CONTENT_ADMIN_ITEM_LAN_22." ".$content_tmppath_file." ".CONTENT_ADMIN_ITEM_LAN_23."</b><br />";
|
||||
}
|
||||
if(!is_writable($content_tmppath_image)){
|
||||
$text .= "<b>".CONTENT_ADMIN_ITEM_LAN_22." ".$content_tmppath_image." ".CONTENT_ADMIN_ITEM_LAN_23."</b><br />";
|
||||
}
|
||||
$text .= "<br />
|
||||
<input class='tbox' type='file' name='file_userfile[]' size='36' />
|
||||
".$rs -> form_select_open("uploadtype")."
|
||||
".($checkicon ? $rs -> form_option(CONTENT_ADMIN_ITEM_LAN_114, "0", "1") : '')."
|
||||
".($checkattach ? $rs -> form_option(CONTENT_ADMIN_ITEM_LAN_115, "0", "2") : '')."
|
||||
".($checkimages ? $rs -> form_option(CONTENT_ADMIN_ITEM_LAN_116, "0", "3") : '')."
|
||||
".$rs -> form_select_close()."
|
||||
<input type='hidden' name='tmppathicon' value='".$content_tmppath_icon."' />
|
||||
<input type='hidden' name='tmppathfile' value='".$content_tmppath_file."' />
|
||||
<input type='hidden' name='tmppathimage' value='".$content_tmppath_image."' />
|
||||
<input class='button' type='submit' name='uploadfile' value='".CONTENT_ADMIN_ITEM_LAN_104."' />";
|
||||
}
|
||||
$text .= "<br />";
|
||||
return $text;
|
||||
}
|
||||
SC_END
|
||||
|
||||
SC_BEGIN CONTENTFORM_ICON
|
||||
global $row, $rs, $show, $iconlist;
|
||||
if($show['icon']===true){
|
||||
$text = $rs -> form_text("content_icon", 60, $row['content_icon'], 100)."
|
||||
".$rs -> form_button("button", '', CONTENT_ADMIN_ITEM_LAN_105, "onclick=\"expandit('divicon')\"")."
|
||||
<div id='divicon' style='{head}; display:none'>";
|
||||
if(empty($iconlist)){
|
||||
$text .= CONTENT_ADMIN_ITEM_LAN_121;
|
||||
}else{
|
||||
foreach($iconlist as $icon){
|
||||
if(file_exists($icon['path']."thumb_".$icon['fname'])){
|
||||
$img = "<img src='".$icon['path']."thumb_".$icon['fname']."' style='width:100px; border:0' alt='' />";
|
||||
}else{
|
||||
$img = "<img src='".$icon['path'].$icon['fname']."' style='width:100px; border:0' alt='' />";
|
||||
}
|
||||
$text .= "<a href=\"javascript:insertext('".$icon['fname']."','content_icon','divicon')\">".$img."</a> ";
|
||||
}
|
||||
}
|
||||
$text .= "</div>";
|
||||
return $text;
|
||||
}
|
||||
SC_END
|
||||
|
||||
SC_BEGIN CONTENTFORM_ATTACH
|
||||
global $row, $rs, $show, $checkattachnumber, $filelist;
|
||||
if($show['attach']===true){
|
||||
|
||||
$filetmp = explode("[file]", $row['content_file']);
|
||||
foreach($filetmp as $key => $value) {
|
||||
if($value == "") {
|
||||
unset($filetmp[$key]);
|
||||
}
|
||||
}
|
||||
$attachments = array_values($filetmp);
|
||||
for($i=0;$i<$checkattachnumber;$i++){
|
||||
$k=$i+1;
|
||||
$num = (strlen($k) == 1 ? "0".$k : $k);
|
||||
$attachments[$i] = ($attachments[$i] ? $attachments[$i] : "");
|
||||
|
||||
//choose file
|
||||
$text .= "
|
||||
<div style='padding:2px;'>
|
||||
".$num." ".$rs -> form_text("content_files".$i."", 60, $attachments[$i], 100)."
|
||||
".$rs -> form_button("button", '', CONTENT_ADMIN_ITEM_LAN_105, "onclick=\"expandit('divfile".$i."')\"")."
|
||||
<div id='divfile".$i."' style='{head}; display:none'>";
|
||||
if(empty($filelist)){
|
||||
$text .= CONTENT_ADMIN_ITEM_LAN_122;
|
||||
}else{
|
||||
foreach($filelist as $file){
|
||||
$text .= CONTENT_ICON_FILE." <a href=\"javascript:insertext('".$file['fname']."','content_files".$i."','divfile".$i."')\">".$file['fname']."</a><br />";
|
||||
}
|
||||
}
|
||||
$text .= "</div></div>";
|
||||
}
|
||||
return $text;
|
||||
}
|
||||
SC_END
|
||||
|
||||
SC_BEGIN CONTENTFORM_IMAGES
|
||||
global $row, $rs, $show, $checkimagesnumber, $imagelist;
|
||||
if($show['images']===true){
|
||||
$imagestmp = explode("[img]", $row['content_image']);
|
||||
foreach($imagestmp as $key => $value) {
|
||||
if($value == "") {
|
||||
unset($imagestmp[$key]);
|
||||
}
|
||||
}
|
||||
$imagesarray = array_values($imagestmp);
|
||||
for($i=0;$i<$checkimagesnumber;$i++){
|
||||
$k=$i+1;
|
||||
$num = (strlen($k) == 1 ? "0".$k : $k);
|
||||
$imagesarray[$i] = ($imagesarray[$i] ? $imagesarray[$i] : "");
|
||||
|
||||
//choose image
|
||||
$text .= "
|
||||
<div style='padding:2px;'>
|
||||
".$num." ".$rs -> form_text("content_images".$i."", 60, $imagesarray[$i], 100)."
|
||||
".$rs -> form_button("button", '', CONTENT_ADMIN_ITEM_LAN_105, "onclick=\"expandit('divimage".$i."')\"")."
|
||||
<div id='divimage".$i."' style='{head}; display:none'>";
|
||||
if(empty($imagelist)){
|
||||
$text .= CONTENT_ADMIN_ITEM_LAN_123;
|
||||
}else{
|
||||
foreach($imagelist as $image){
|
||||
if(file_exists($image['path']."thumb_".$image['fname'])){
|
||||
$img = "<img src='".$image['path']."thumb_".$image['fname']."' style='width:100px; border:0' alt='' />";
|
||||
}else{
|
||||
$img = "<img src='".$image['path'].$image['fname']."' style='width:100px; border:0' alt='' />";
|
||||
}
|
||||
$text .= "<a href=\"javascript:insertext('".$image['fname']."','content_images".$i."','divimage".$i."')\">".$img."</a> ";
|
||||
}
|
||||
}
|
||||
$text .= "</div></div>";
|
||||
}
|
||||
return $text;
|
||||
}
|
||||
SC_END
|
||||
|
||||
SC_BEGIN CONTENTFORM_COMMENT
|
||||
global $row, $rs, $show;
|
||||
if($show['comment']===true){
|
||||
return $rs -> form_radio("content_comment", "1", ($row['content_comment'] ? "1" : "0"), "", "").CONTENT_ADMIN_ITEM_LAN_85." ".$rs -> form_radio("content_comment", "0", ($row['content_comment'] ? "0" : "1"), "", "").CONTENT_ADMIN_ITEM_LAN_86;
|
||||
}
|
||||
SC_END
|
||||
|
||||
SC_BEGIN CONTENTFORM_RATING
|
||||
global $row, $rs, $show;
|
||||
if($show['rating']===true){
|
||||
return $rs -> form_radio("content_rate", "1", ($row['content_rate'] ? "1" : "0"), "", "").CONTENT_ADMIN_ITEM_LAN_85." ".$rs -> form_radio("content_rate", "0", ($row['content_rate'] ? "0" : "1"), "", "").CONTENT_ADMIN_ITEM_LAN_86;
|
||||
}
|
||||
SC_END
|
||||
|
||||
SC_BEGIN CONTENTFORM_PEICON
|
||||
global $row, $rs, $show;
|
||||
if($show['pe']===true){
|
||||
return $rs -> form_radio("content_pe", "1", ($row['content_pe'] ? "1" : "0"), "", "").CONTENT_ADMIN_ITEM_LAN_85." ".$rs -> form_radio("content_pe", "0", ($row['content_pe'] ? "0" : "1"), "", "").CONTENT_ADMIN_ITEM_LAN_86;
|
||||
}
|
||||
SC_END
|
||||
|
||||
SC_BEGIN CONTENTFORM_VISIBILITY
|
||||
global $row, $show;
|
||||
if($show['visibility']===true){
|
||||
return r_userclass("content_class",$row['content_class'], "CLASSES");
|
||||
}
|
||||
SC_END
|
||||
|
||||
SC_BEGIN CONTENTFORM_SCORE
|
||||
global $row, $rs, $show;
|
||||
if($show['score']===true){
|
||||
$text = $rs -> form_select_open("content_score")."
|
||||
".$rs -> form_option(CONTENT_ADMIN_ITEM_LAN_41, 0, "none");
|
||||
for($a=1; $a<=100; $a++){
|
||||
$text .= $rs -> form_option($a, ($row['content_score'] == $a ? "1" : "0"), $a);
|
||||
}
|
||||
$text .= $rs -> form_select_close();
|
||||
return $text;
|
||||
}
|
||||
SC_END
|
||||
|
||||
SC_BEGIN CONTENTFORM_META
|
||||
global $row, $rs, $show;
|
||||
if($show['meta']===true){
|
||||
return $rs -> form_text("content_meta", 74, $row['content_meta'], 250);
|
||||
}
|
||||
SC_END
|
||||
|
||||
SC_BEGIN CONTENTFORM_LAYOUT
|
||||
global $row, $rs, $show, $tp, $fl, $content_pref;
|
||||
if($show['layout']===true){
|
||||
|
||||
if(!isset($content_pref["content_theme"])){
|
||||
$dir = $plugindir."templates/default";
|
||||
}else{
|
||||
if(is_readable($tp->replaceConstants($content_pref["content_theme"])."content_content_template.php")){
|
||||
$dir = $tp->replaceConstants($content_pref["content_theme"]);
|
||||
}else{
|
||||
$dir = $plugindir."templates/default";
|
||||
}
|
||||
}
|
||||
//get_files($path, $fmask = '', $omit='standard', $recurse_level = 0, $current_level = 0, $dirs_only = FALSE)
|
||||
$rejectlist = array('$.','$..','/','CVS','thumbs.db','Thumbs.db','*._$', 'index', 'null*', '.bak');
|
||||
$templatelist = $fl->get_files($dir,"content_content",$rejectlist);
|
||||
|
||||
//template
|
||||
$check = "";
|
||||
if(isset($row['content_layout']) && $row['content_layout'] != ""){
|
||||
$check = $row['content_layout'];
|
||||
}else{
|
||||
if(isset($content_pref["content_layout"])){
|
||||
$check = $content_pref["content_layout"];
|
||||
}
|
||||
}
|
||||
|
||||
$text = $rs -> form_select_open("content_layout")."
|
||||
".$rs -> form_option(CONTENT_ADMIN_ITEM_LAN_94, 0, "none");
|
||||
foreach($templatelist as $template){
|
||||
$templatename = substr($template['fname'], 25, -4);
|
||||
$templatename = ($template['fname'] == "content_content_template.php" ? "default" : $templatename);
|
||||
$text .= $rs -> form_option($templatename, ($check == $template['fname'] ? "1" : "0"), $template['fname']);
|
||||
}
|
||||
$text .= $rs -> form_select_close();
|
||||
return $text;
|
||||
}
|
||||
SC_END
|
||||
|
||||
SC_BEGIN CONTENTFORM_CUSTOM
|
||||
global $CONTENTFORM_CUSTOM;
|
||||
return $CONTENTFORM_CUSTOM;
|
||||
SC_END
|
||||
|
||||
SC_BEGIN CONTENTFORM_CUSTOM_KEY
|
||||
global $CONTENTFORM_CUSTOM_KEY;
|
||||
return $CONTENTFORM_CUSTOM_KEY;
|
||||
SC_END
|
||||
|
||||
SC_BEGIN CONTENTFORM_CUSTOM_VALUE
|
||||
global $CONTENTFORM_CUSTOM_VALUE;
|
||||
return $CONTENTFORM_CUSTOM_VALUE;
|
||||
SC_END
|
||||
|
||||
SC_BEGIN CONTENTFORM_PRESET
|
||||
global $CONTENTFORM_PRESET;
|
||||
return $CONTENTFORM_PRESET;
|
||||
SC_END
|
||||
|
||||
SC_BEGIN CONTENTFORM_PRESET_KEY
|
||||
global $CONTENTFORM_PRESET_KEY;
|
||||
return $CONTENTFORM_PRESET_KEY;
|
||||
SC_END
|
||||
|
||||
SC_BEGIN CONTENTFORM_PRESET_VALUE
|
||||
global $CONTENTFORM_PRESET_VALUE;
|
||||
return $CONTENTFORM_PRESET_VALUE;
|
||||
SC_END
|
||||
|
||||
*/
|
||||
?>
|
||||
?>
|
Reference in New Issue
Block a user