"Personal Options", 'url' => "$PHP_SELF?mod=options&action=personal", 'access' => "4", ), array( 'name' => "Block IP's from posting comments", 'url' => "$PHP_SELF?mod=ipban", 'access' => "1", ), array( 'name' => "System Configurations", 'url' => "$PHP_SELF?mod=options&action=syscon&rand=".time(), 'access' => "1", ), array( 'name' => "Edit Templates", 'url' => "$PHP_SELF?mod=options&action=templates", 'access' => "1", ), array( 'name' => "Add/Edit Users", 'url' => "$PHP_SELF?mod=editusers&action=list", 'access' => "1", ), array( 'name' => "Archives Manager", 'url' => "$PHP_SELF?mod=tools&action=archive", 'access' => "1", ), array( 'name' => "Manage Uploaded Images", 'url' => "$PHP_SELF?mod=images", 'access' => "1", ), array( 'name' => "Backup Tool", 'url' => "$PHP_SELF?mod=tools&action=backup", 'access' => "1", ), array( 'name' => "Edit Categories", 'url' => "$PHP_SELF?mod=categories", 'access' => "1", ), array( 'name' => "Configure XFields v2", 'url' => "$PHP_SELF?mod=xfields&xfieldsaction=configure", 'access' => "1", ), array( 'name' => "Search and Replace Tool", 'url' => "$PHP_SELF?mod=snr", 'access' => "1", ), ); //------------------------------------------------ // Cut the options for wich we don't have access //------------------------------------------------ $count_options = count($options); for($i=0; $i<$count_options; $i++){ if($member_db[1] > $options[$i]['access']){ unset($options[$i]); } } echo''; $i = 0; foreach($options as $option){ if($i%2 == 0){ echo"\n\n\n"; } else{ echo"\n\n"; } $i++; } echo'
   ".$option['name']."".$option['name']."
'; echofooter(); } // ******************************************************************************** // Show Personal Options // ******************************************************************************** elseif($action == "personal") { echoheader("user","Personal Options"); $registrationdate = date("D, d F Y",$member_db[0]); //registration date if($member_db[7] == 1){ $ifchecked = "Checked"; } //if user wants to hide his e-mail foreach($member_db as $key=>$value){ $member_db[$key] = stripslashes(preg_replace(array("'\"'", "'\''"), array(""", "'"),$member_db[$key])); } echo" "; if($member_db[1] != 4){echo""; }else{ $bg = "bgcolor=#F7F6F4"; } echo""; } echo"
  Username $member_db[2]
  New Password    Only if you want to change the current
  Nickname
  Email     Hide my e-mail from visitors
  Default Avatar URL     will appear on 'Add News' page
  Access Level "; if ($member_db[1] == 4){ echo "commenter"; } elseif ($member_db[1] == 3){ echo "journalist"; } elseif ($member_db[1] == 2){ echo "editor"; } elseif ($member_db[1] == 1){ echo "administrator"; } if($member_db[1] != 4){ echo"
  written news $member_db[6]
  registration date $registrationdate

"; echofooter(); } // ******************************************************************************** // Save Personal Options // ******************************************************************************** elseif($action == "dosavepersonal") { function spostr_replace($field) { $field = str_replace("\n", "", $field); $field = str_replace("\r", "", $field); $field = str_replace("|", "|", $field); return $field; } $editpassword = spostr_replace($editpassword); $editnickname = spostr_replace($editnickname); $edithidemail = spostr_replace($edithidemail); $editmail = spostr_replace($editmail); $change_avatar = spostr_replace($change_avatar); if($edithidemail){ $edithidemail = 1;}else{ $edithidemail = 0; } $avatars = preg_replace(array("'\|'","'\n'","' '"), array("","","_"), $avatars); $old_user_db = file("./data/users.db.php"); $new_user_db = fopen("./data/users.db.php", w); $personal_success = FALSE; foreach($old_user_db as $old_user_db_line){ $old_user_db_arr = explode("|", $old_user_db_line); if(strtolower($username) != strtolower($old_user_db_arr[2])){ fwrite($new_user_db,"$old_user_db_line"); } else{ if($editpassword != ""){ $old_user_db_arr[3] = md5(md5($editpassword)); if($config_use_cookies == TRUE){ setcookie("md5_password", $old_user_db_arr[3]); } $_SESSION['md5_password'] = $old_user_db_arr[3]; } fwrite($new_user_db,"$old_user_db_arr[0]|$old_user_db_arr[1]|$old_user_db_arr[2]|$old_user_db_arr[3]|$editnickname|$editmail|$old_user_db_arr[6]|$edithidemail|$change_avatar|$old_user_db_arr[9]||\n"); $personal_success = TRUE; } } fclose($new_user_db); if($personal_success){ msg("info", "Changes Saved", "Your personal information was saved.", "$PHP_SELF?mod=options&action=personal"); } else{ msg("error", "Error !!!", "Error while listing users, $username not found", "$PHP_SELF?mod=options&action=personal"); } } // ******************************************************************************** // Edit Templates // ******************************************************************************** elseif($action == "templates") { if($member_db[1] != 1){ msg("error", "Access Denied", "You don't have permissions for this type of action"); } /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Detect all template packs we have ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ $templates_list = array(); if(!$handle = opendir("./data")){ die("
Can not open directory $cutepath/data "); } while (false !== ($file = readdir($handle))){ if(eregi(".tpl", $file)){ $file_arr = explode(".", $file); $templates_list[]= $file_arr[0]; } } closedir($handle); /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ If we want to create new template ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ if($subaction == "new"){ echoheader("options", "New Template"); echo"
Create new template based on: with name  
'; echofooter(); exit; } /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Do Create the new template ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ if($subaction == "donew"){ if(!eregi("^[a-z0-9_-]+$", $template_name)){ msg("error", "Error", "The name of the template must be only with letters and numbers", "$PHP_SELF?mod=options&subaction=new&action=templates"); } if(file_exists("./data/${template_name}.tpl")){ msg("error", "Error", "Template with this name already exists", "$PHP_SELF?mod=options&subaction=new&action=templates"); } if($base_template != ""){ $base_file = "./data/${base_template}.tpl"; } else{ $base_file = "./data/Default.tpl"; } if (!copy($base_file, "./data/${template_name}.tpl")) { msg("error", "Error", "Can not copy file $base_file to ./data/ folder with name ${template_name}.tpl"); } @chmod("./data/${template_name}.tpl", 0777); msg("info", "Template Created", "A new template was created with name ${template_name}
", "$PHP_SELF?mod=options&action=templates"); } /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Deleting template, preparation ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ if($subaction == "delete"){ if(strtolower($do_template) == "default"){ msg("Error", "Error !!!", "You can not delete the default template", "$PHP_SELF?mod=options&action=templates"); } $msg = "
Are you sure you want to delete the template $do_template ?

 
"; msg("info", "Deleting Template", $msg); } /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ DO Deleting template ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ if($subaction == "dodelete"){ if(strtolower($do_template) == "default"){ msg("Error", "Error !!!", "You can not delete the default template", "$PHP_SELF?mod=options&action=templates"); } $unlink = unlink("./data/${do_template}.tpl"); if(!$unlink){ msg("error", "Error", "Can not delete file ./data/${do_template}.tpl
maybe the is no permission from the server"); } else{ msg("info", "Template Deleted", "The template ${do_template} was deleted.", "$PHP_SELF?mod=options&action=templates"); } } /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Show The Template Manager ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ if($do_template == '' or !$do_template){ $do_template = 'Default'; $show_delete_link = ''; }elseif(strtolower($do_template) != 'default'){ $show_delete_link = "[delete this template]"; } require("./data/${do_template}.tpl"); if(eregi("opera", $HTTP_USER_AGENT)){ $tr_hidden = ""; } else{ $tr_hidden = " style='display:none'"; } $templates_names = array("template_active", "template_comment", "template_form", "template_full", "template_prev_next", "template_dateheader"); foreach($templates_names as $template) { $$template = preg_replace("//",">",$$template); } echoheader("options","Templates"); echo'
Manage Templates
 Editing Template '.$do_template.'
 Switch to Template
 [create new template]  '.$show_delete_link.'
 Understanding Templates

Edit Template Parts
Active News
{title}
{avatar}
{alternating}
{music}
{short-story}
{full-story}
{author}
{author-name}
[mail]
and [/mail]
{date}
{date-local}
[link]
and [/link]
[full-link]
and [/full-link]
[com-link]
and [/com-link]
{comments-num}
{category}
{category-icon}
[xfvalue_X]
[xfgiven_X]Text: [xfvalue_X][/xfgiven_X]
- Title of the article
- Shows Avatar image (if any)
- Prints either "cn_news_odd" or "cn_news_even" (tip: CSS classes)
- Shows music listened to when posting (or "silence")
- Short story of news item
- The full story
- Author of the article, with link to authors email (if any)
- The name of the author, without email
- Shows link to the authors mail (if any) ex: [mail]Email[/mail]
- Date when the story was written
- Same as {date}, only in a localized language (see config)
- Will generate a permanent link to the full story
- Link to the full story of article, only if there is a full story
- Generate link to the comments of article
- This will display the number of comments posted for the article
- Name of the category where article is posted (if any)
- Shows the category icon (if any)
- Shows the value of Xfield named "X"
- Shows "Text: <Xfield named "X"> if it is set for this post

 
Full Story
{title}
{avatar}
{music}
{full-story}
{short-story}

{author}
{author-name}
[mail]
and [/mail]
{date}
{date-local}
{comments-num}
{category}
{category-icon}
[xfvalue_X]
[xfgiven_X]Text: [xfvalue_X][/xfgiven_X]
- Title of the article
- Shows Avatar image (if any)
- Shows music listened to when posting (or "silence")
- The full story
- Short story of news item
- Author of the article, with link to authors email (if any)
- The name of the author, without email
- Shows link to the author mail (if any) ex: [mail]Email[/mail]
- Date when the story was written
- Same as {date}, only in a localized language (see config)
- This will display the number of comments posted for the article
- Name of the category where article is posted (if any)
- Shows the category icon (if any)
- Shows the value of Xfield named "X"
- Shows "Text: <Xfield named "X"> if it is set for this post

 
Comment
{author}
{admin}
{alternating}
{mail}
{comnum}
{host}
{date}
{date-local}
{comment}
- Name of the comment poster
- Show whether the commenter is registered
- Prints either "cn_comment_odd" or "cn_comment_even" (tip: CSS classes)
- E-mail of the poster
- Actual number of the comment (the lower the older)
- Show shortened host or ip if unresolvable (can eat alot of resources)
- Date when the comment was posted
- Same as {date}, only in a localized language (see config)
- The Comment

 
Add comment form
Do not edit this unless you have basic HTML knowledge.
{savedname} - prints name saved in a user\'s "remember me"-cookie (use in name field value)
{savedmail} - prints mail or url saved in a user\'s "remember me"-cookie (use in mail field value)
{remember} - prints the "remember me" checkbox (you still need to put some text after it

 
Previous & Next
[prev-link] and [/prev-link]
[next-link]
and [/next-link]
{pages}
- Will generate a link to previous page (if there is)
- Will generate a link to next page (if there is)
- Shows linked numbers of the pages; example: 1 2 3 4
Comments Previous & Next
[prev-link] and [/prev-link]
[next-link]
and [/next-link]
{pages}
- Will generate a link to previous page (if there is)
- Will generate a link to next page (if there is)
- Shows linked numbers of the pages; example: 1 2 3 4
Dateheader
{dateheader}
{dateheader-local}

- Will generate a grouping date header for posts on same day
- Same as above, only in a localized language (see config)

'; echofooter(); } // ******************************************************************************** // Do Save Changes to Templates // ******************************************************************************** elseif($action == "dosavetemplates") { if($member_db[1] != 1){ msg("error", "Access Denied", "You don't have permissions for this type of action"); } $templates_names = array("edit_active", "edit_comment", "edit_form", "edit_full", "edit_prev_next", "edit_cprev_next", "edit_dateheader"); foreach($templates_names as $template) { $$template = stripslashes($$template); } if($do_template == "" or !$do_template){ $do_template = "Default"; } $template_file = "./data/${do_template}.tpl"; $handle = fopen("$template_file","w"); fwrite($handle, "\n"); msg("info","Changes Saved","The changes to template $do_template were successfully saved.","$PHP_SELF?mod=options&action=templates&do_template=$do_template"); } // ******************************************************************************** // System Configuration // ******************************************************************************** elseif($action == "syscon") { echoheader("options", "System Configuration"); echo '
'; function showRow($title="", $description="", $field="", $juice="") { global $i; if( $i%2 == 0 and $title != ""){ $bg = 'configrowalt'; if ($juice == "Yes") { $bg = 'configrowjuice'; } } elseif ($juice == "Yes") { $bg = 'configrowjuicealt'; } else { $bg = 'configrow'; } echo"

$title

$field
$description
1
"; $bg = ""; $i++; } function makeDropDown($options, $name, $selected) { $output = ""); showRow("Full URL to your home website", "example: http://yoursite.com/news.php", "", "Yes"); showRow("Language for visitors", "your language not here? open inc/file/en.visible.php, translate it and save as "<two-letter countrycode>.visible.php". remember to send it to AJ-Fork for inclusion ;)", makeDropDown($sys_con_langs_arr, "save_con[cn_lang]", "$config_cn_lang"), "Yes"); showRow("No Music String", "what will be printed if {music} is empty in an entry", "", "Yes"); showRow("CuteNews Skin", "you can download more from our website", makeDropDown($sys_con_skins_arr, "save_con[skin]", "$config_skin")); showRow("Auto Wrap Comments", "any word that is longer than this will be wrapped", ""); showRow("Comments Flood Protection", "in seconds; 0 = no protection", ""); showRow("Smilies", "separate them with commas (,)", ""); showRow("Time Adjustment", "in minutes; eg. : 180=+3 hours; -120=-2 hours", ""); showRow("Use Avatars", "if not, the avatar URL field wont be shown", makeDropDown(array("yes"=>"Yes","no"=>"No"), "save_con[use_avatar]", "$config_use_avatar")); showRow("Auto-update Entry Dates", "whether or not to auto-update the date when editing news", makeDropDown(array("yes"=>"Yes","no"=>"No"), "save_con[update_edit_time]", "$config_update_edit_time"), "Yes"); showRow("Reverse Comments", "if yes, newest comments will be shown on the top", makeDropDown(array("yes"=>"Yes","no"=>"No"), "save_con[reverse_comments]", "$config_reverse_comments")); showRow("Reverse News", "if yes, older news will be shown on the top", makeDropDown(array("yes"=>"Yes","no"=>"No"), "save_con[reverse_active]", "$config_reverse_active")); showRow("Prospective Posting", "turn this on to not show future posts until their date has passed", makeDropDown(array("On"=>"On","Off"=>"Off"), "save_con[prospective]", "$config_prospective"), "Yes"); // Full Story Configs showRow("Show Comments When Showing Full Story", "if yes, comments will be shown under the story", makeDropDown(array("yes"=>"Yes","no"=>"No"), "save_con[show_comments_with_full]", "$config_show_comments_with_full")); showRow("Time Format For News", "view help for time formatting here", ""); // Add DATE fields for config showRow("Local Time Format For News", "Help for local time formatting here", "", "Yes"); // listbox: // showRow("Select locale for {date-local}", "Select the language to be used for localized dates (not working yet)", ""); showRow("Language for local time formats", "help here (windows) and here (unix/linux).
examples: no_NO for norwegian, de_DE for german.", "", "Yes"); // END Add DATE a.org showRow("Show Full Story In PopUp", "full Story will be opened in PopUp window", makeDropDown(array("yes"=>"Yes","no"=>"No"), "save_con[full_popup]", "$config_full_popup")); showRow("Settings for Full Story PopUp", "only if 'Show Full Story In PopUp' is enabled", ""); // COMMENTS Configs showRow("Comments Pagination", "if yes, comments will be divided over several pages", makeDropDown(array("Yes"=>"Yes","No"=>"No"), "save_con[comments_pagination]", "$config_comments_pagination"), "Yes"); showRow("Comments Per Page", "if yes to the previous, how many on each page?", "", "Yes"); showRow("Only Registered Users Can Post Comments", "if yes, only registered users can post comments", makeDropDown(array("yes"=>"Yes","no"=>"No"), "save_con[only_registered_comment]", "$config_only_registered_comment")); showRow("Allow Mail Field to Act and as URL Field", "visitors will be able to put their site URL insted of mail", makeDropDown(array("yes"=>"Yes","no"=>"No"), "save_con[allow_url_instead_mail]", "$config_allow_url_instead_mail")); showRow("Show Full Story When Showing Comments", "if yes, comments will be shown under the story", makeDropDown(array("yes"=>"Yes","no"=>"No"), "save_con[show_full_with_comments]", "$config_show_full_with_comments")); showRow("Time Format For Comments", "view help for time formatting here", ""); // Add DATE (this is where we decide how local dates are formatted for comments showRow("Local Time Format For Comments", "view help for local time formatting here", "", "Yes"); // END Add DATE showRow("Show Dateheader", "if yes, a seperate date-header for posts on same day will show", makeDropDown(array("Yes"=>"Yes","No"=>"No"), "save_con[date_header]", "$config_date_header"), "Yes"); showRow("Time Format For Dateheader", "time format for above date-header. uses the php date()-function", "", "Yes"); showRow("Local Time Format For Dateheader", "view help for local time formatting here", "", "Yes"); showRow("Show Comments In PopUp", "comments will be opened in PopUp window", makeDropDown(array("yes"=>"Yes","no"=>"No"), "save_con[comments_popup]", "$config_comments_popup")); showRow("Settings for Comments PopUp", "only if 'Show Comments In PopUp' is enabled", ""); // added by appelsinjuice.org showRow("{admin} setup", "What to show where {admin} is inserted in the comment template", "", "Yes"); // end addblock a.org echo" ". showRow("","","
")."
"; echofooter(); } // ******************************************************************************** // Save System Configuration // ******************************************************************************** elseif($action == "dosavesyscon") { if($member_db[1] != 1){ msg("error", "Access Denied", "You don't have permission for this section"); } $handler = fopen("./data/config.php", "w"); fwrite($handler, "$value) { fwrite($handler, "\$config_$name = \"$value\";\n\n"); } fwrite($handler, "?>"); fclose($handler); include("./skins/".$save_con["skin"].".skin.php"); msg("info", "Configurations Saved", "The System Configurations were successfully saved."); } ?>
Historical archive. This is a preserved copy of 36 Degrees Design (2005–2008), the early web-design weblog of Stuart Frisby. It is maintained independently as a piece of web history and is not operated by, affiliated with, or endorsed by Stuart Frisby. If you are the original owner and would like this domain returned, get in touch — it’s yours, no fuss.