Changeset 862 in ExiteCMS
- Timestamp:
- 10/02/07 22:27:18 (4 years ago)
- Location:
- modules/common
- Files:
-
- 1 added
- 11 edited
-
download_statistics_panel/php-files/modules/download_statistics_panel/dls_process.php (modified) (1 diff)
-
download_statistics_panel/php-files/modules/download_statistics_panel/download_statistics_panel.php (modified) (1 diff)
-
download_statistics_panel/php-files/modules/download_statistics_panel/geomapping.php (modified) (1 diff)
-
download_statistics_panel/php-files/modules/download_statistics_panel/templates/modules.download_statistics_panel.tpl (modified) (1 diff)
-
forum_threads_list_panel/php-files/modules/forum_threads_list_panel/forum_threads_list_panel.php (modified) (2 diffs)
-
mail2forum/php-files/modules/mail2forum/m2f_config.php (modified) (1 diff)
-
mail2forum/php-files/modules/mail2forum/m2f_smtp.php (modified) (2 diffs)
-
wiki/php-files/modules/wiki/3rdparty/plugins/wikiedit/wikiedit2.js (modified) (2 diffs)
-
wiki/php-files/modules/wiki/actions/footer.php (modified) (1 diff)
-
wiki/php-files/modules/wiki/handlers/page/upload.php (added)
-
wiki/php-files/modules/wiki/index.php (modified) (2 diffs)
-
wiki/php-files/modules/wiki/module_installer.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
modules/common/download_statistics_panel/php-files/modules/download_statistics_panel/dls_process.php
r836 r862 157 157 } 158 158 } 159 // set the ds_onmap marker 160 $result = dbquery("UPDATE ".$db_prefix."dls_statistics SET ds_onmap = '1' WHERE ds_processed = '0' AND ds_file LIKE '%software.ver'"); 161 159 162 // mark all newly imported statistics records as processed 160 163 $result = dbquery("UPDATE ".$db_prefix."dls_statistics SET ds_processed = '1' WHERE ds_processed = '0'"); -
modules/common/download_statistics_panel/php-files/modules/download_statistics_panel/download_statistics_panel.php
r844 r862 35 35 // first panel: statistics overview 36 36 37 $data = dbarray(dbquery("SELECT MIN(ds_timestamp) AS timestamp FROM ".$db_prefix."dls_statistics")); 38 if (!is_array($data)) $data = array("timestamp" => time()); 39 $variables['date_first'] = $data['timestamp']; 40 41 $data = dbarray(dbquery("SELECT MAX(ds_timestamp) AS timestamp FROM ".$db_prefix."dls_statistics")); 42 if (!is_array($data)) $data = array("timestamp" => time()); 43 $variables['date_last'] = $data['timestamp']; 44 45 $data = dbarray(dbquery("SELECT COUNT(*) AS count FROM ".$db_prefix."dls_statistics")); 46 if (!is_array($data)) $data = array("count" => 0); 47 $variables['stats_count'] = $data['count']; 48 49 $data = dbarray(dbquery("SELECT COUNT(DISTINCT ds_url) AS count FROM ".$db_prefix."dls_statistics")); 50 if (!is_array($data)) $data = array("count" => 0); 51 $variables['stats_files'] = $data['count']; 37 if (isset($_POST['date_first'])) { 38 $variables['date_first'] = $_POST['date_first']; 39 } else { 40 $data = dbarray(dbquery("SELECT MIN(ds_timestamp) AS timestamp FROM ".$db_prefix."dls_statistics")); 41 if (!is_array($data)) $data = array("timestamp" => time()); 42 $variables['date_first'] = $data['timestamp']; 43 } 44 45 if (isset($_POST['date_last'])) { 46 $variables['date_last'] = $_POST['date_last']; 47 } else { 48 $data = dbarray(dbquery("SELECT MAX(ds_timestamp) AS timestamp FROM ".$db_prefix."dls_statistics")); 49 if (!is_array($data)) $data = array("timestamp" => time()); 50 $variables['date_last'] = $data['timestamp']; 51 } 52 53 if (isset($_POST['stats_count'])) { 54 $variables['stats_count'] = $_POST['stats_count']; 55 } else { 56 $data = dbarray(dbquery("SELECT COUNT(*) AS count FROM ".$db_prefix."dls_statistics")); 57 if (!is_array($data)) $data = array("count" => 0); 58 $variables['stats_count'] = $data['count']; 59 } 60 61 if (isset($_POST['stats_files'])) { 62 $variables['stats_files'] = $_POST['stats_files']; 63 } else { 64 $result = dbquery("SELECT COUNT(ds_url) AS count FROM ".$db_prefix."dls_statistics GROUP BY ds_url"); 65 $variables['stats_files'] = dbrows($result); 66 } 52 67 53 68 // second panels: statistics per download mirror -
modules/common/download_statistics_panel/php-files/modules/download_statistics_panel/geomapping.php
r836 r862 301 301 302 302 // consolidate the IP statistics per country 303 $result = dbquery("SELECT DISTINCT ds_ip, ds_cc FROM ".$db_prefix."dls_statistics WHERE ds_ file LIKE '%software.ver'");303 $result = dbquery("SELECT DISTINCT ds_ip, ds_cc FROM ".$db_prefix."dls_statistics WHERE ds_onmap = '1'"); 304 304 // and add them to the country table 305 305 while ($data = dbarray($result)) { -
modules/common/download_statistics_panel/php-files/modules/download_statistics_panel/templates/modules.download_statistics_panel.tpl
r844 r862 58 58 {include file="_opentable.tpl" name=$_name title=$locale.dls120 state=$_state style=$_style} 59 59 <form name='selectionforum' method='post' action='{$smarty.const.FUSION_SELF}'> 60 <input type='hidden' name='date_first' value='{$date_first}' /> 61 <input type='hidden' name='date_last' value='{$date_last}' /> 62 <input type='hidden' name='stats_count' value='{$stats_counts}' /> 63 <input type='hidden' name='stats_files' value='{$stats_files}' /> 60 64 <table align='center' cellpadding='0' cellspacing='0' width='500'> 61 65 <tr> -
modules/common/forum_threads_list_panel/php-files/modules/forum_threads_list_panel/forum_threads_list_panel.php
r844 r862 20 20 // get the list of latest threads 21 21 $result = dbquery( 22 "SELECT tf.*, tt.*, tu.user_id,user_name , MAX(tp.post_id) as last_id, COUNT(tp.post_id) as count_postsFROM ".$db_prefix."forums tf22 "SELECT tf.*, tt.*, tu.user_id,user_name FROM ".$db_prefix."forums tf 23 23 INNER JOIN ".$db_prefix."threads tt USING(forum_id) 24 24 INNER JOIN ".$db_prefix."posts tp USING(thread_id) … … 38 38 while ($data = dbarray($result)) { 39 39 $data['poll'] = fpm_panels_poll_exists($data['forum_id'], $data['thread_id']); 40 $data['count_posts']--; 40 $data2 = dbarray(dbquery("SELECT MAX(post_id) AS last_id FROM ".$db_prefix."posts WHERE thread_id = '".$data['thread_id']."'")); 41 $data['last_id'] = $data2['last_id']; 42 $data['count_posts'] = dbcount("(*)", "posts", "thread_id = '".$data['thread_id']."'") - 1; 41 43 $threadlist[] = $data; 42 44 } -
modules/common/mail2forum/php-files/modules/mail2forum/m2f_config.php
r836 r862 29 29 // default: 1 30 30 define('M2F_MAX_ATTACHMENTS', 1); 31 32 // Maximum size of an attachments. Attachments bigger that the size defined here will never be send out via 33 // email, only a link will be included 34 // 35 // default: 5242880 36 define('M2F_MAX_ATTACH_SIZE', 5242880); 31 37 32 38 // With this switch you control the from address of outgoing email. The default behaviour is to use the email -
modules/common/mail2forum/php-files/modules/mail2forum/m2f_smtp.php
r844 r862 388 388 break; 389 389 case 1: 390 // attach the attachments to the email 391 $mail->AddAttachment(PATH_ATTACHMENTS.$attachment['attach_name']); 392 break; 390 // check the size of the attachments, don't send it out if it's to big 391 if (filesize(PATH_ATTACHMENTS.$attachment['attach_name']) < M2F_MAX_ATTACH_SIZE) { 392 // attach the attachments to the email 393 $mail->AddAttachment(PATH_ATTACHMENTS.$attachment['attach_name']); 394 break; 395 } 393 396 case 2: 394 397 // add a link pointing to the attachment … … 405 408 break; 406 409 case 1: 407 // attach the attachments to the email 408 $mail->AddAttachment(PATH_ATTACHMENTS.$attachment['attach_name']); 409 break; 410 // check the size of the attachments, don't send it out if it's to big 411 if (filesize(PATH_ATTACHMENTS.$attachment['attach_name']) < M2F_MAX_ATTACH_SIZE) { 412 // attach the attachments to the email 413 $mail->AddAttachment(PATH_ATTACHMENTS.$attachment['attach_name']); 414 break; 415 } 410 416 case 2: 411 417 // add a link pointing to the attachment -
modules/common/wiki/php-files/modules/wiki/3rdparty/plugins/wikiedit/wikiedit2.js
r806 r862 108 108 this.addButton("textred","Marked text","'\\'\\'','\\'\\'',2"); 109 109 this.addButton("createlink","Hyperlink","","document.getElementById('" + this.id + "')._owner.createLink"); 110 this.addButton("createimage","Image","","document.getElementById('" + this.id + "')._owner.createImage"); 110 111 // this.addButton("createtable","Insert Table","'','\\n#|\\n|| | ||\\n|| | ||\\n|#\\n',2"); 111 112 this.addButton(" "); … … 642 643 } 643 644 645 WikiEdit.prototype.createImage = function (isAlt) 646 { 647 var t = this.area; 648 t.focus(); 649 650 this.getDefines(); 651 652 var n = new RegExp("\n"); 653 if (!n.test(this.sel)) { 654 if (!isAlt) { 655 lnk = prompt("Image:", this.sel); 656 if (lnk!=null) this.sel = lnk; 657 }; 658 str = this.sel1+"{{image class=\"center\" alt=\"description here\" title=\"title here\" url=\"/images/wiki/"+this.trim(this.sel)+"\"}}"+this.sel2; 659 t.value = str; 660 t.setSelectionRange(this.sel1.length, str.length-this.sel2.length); 661 return true; 662 } 663 return false; 664 } 665 644 666 WikiEdit.prototype.help = function () 645 667 { -
modules/common/wiki/php-files/modules/wiki/actions/footer.php
r808 r862 5 5 <?php 6 6 echo $this->HasAccess("write") ? "<a href=\"".$this->href("edit")."\" title=\"Click to edit this page\">Edit page</a> |\n" : ""; 7 echo "<a href=\"".$this->href("upload")."\" title=\"Click to upload new images\">Upload Image</a> |\n"; 7 8 echo "<a href=\"".$this->href("history")."\" title=\"Click to view recent edits to this page\">Page History</a> |\n"; 8 echo $this->GetPageTime() ? "<a href=\"".$this->href("revisions")."\" title=\"Click to view recent revisions list for this page\">".$this->GetPageTime()."</a> |\n" : ""; 9 echo $this->GetPageTime() ? "<a href=\"".$this->href("revisions")."\" title=\"Click to view recent revisions list for this page\">Revisions</a> |\n" : ""; 10 // echo $this->GetPageTime() ? "<a href=\"".$this->href("revisions")."\" title=\"Click to view recent revisions list for this page\">".$this->GetPageTime()."</a> |\n" : ""; 9 11 echo ($this->GetUser() ? "<a href='".$this->href("referrers")."' title='Click to view a list of URLs referring to this page.'>Referrers</a> |\n" : ""); 10 12 // if this page exists 11 13 if ($this->page) 12 14 { 13 if ($owner = $this->GetPageOwner()) 14 { 15 if ($owner == "(Public)") 16 { 17 print("Public page ".($this->IsAdmin() ? "<a href=\"".$this->href("acls")."\">(Edit ACLs)</a>\n" : "\n")); 18 } 19 // if owner is current user 20 elseif ($this->UserIsOwner()) 21 { 22 if ($this->IsAdmin()) 23 { 24 print("Owner: ".$this->Link($owner, "", "", 0)." | <a href=\"".$this->href("acls")."\">Edit ACLs</a>\n"); 25 } 26 else 27 { 28 print("You own this page | <a href=\"".$this->href("acls")."\">Edit ACLs</a>\n"); 29 } 30 } 31 else 32 { 33 print("Owner: ".$this->Link($owner, "", "", 0)."\n"); 34 } 15 switch ($owner = $this->GetPageOwner()) { 16 case "(Public)": 17 print("Public page\n"); 18 break; 19 case $this->UserIsOwner(): 20 print("You own this page\n"); 21 break; 22 case false; 23 print("Nobody".($this->GetUser() ? " (<a href=\"".$this->href("claim")."\">Take Ownership</a>)\n" : "\n")); 24 default: 25 print("Owner: <a href='".BASEDIR."profile.php?lookup=$owner'>".$owner."</a>\n"); 35 26 } 36 else 37 { 38 print("Nobody".($this->GetUser() ? " (<a href=\"".$this->href("claim")."\">Take Ownership</a>)\n" : "\n")); 39 } 27 if ($this->IsAdmin()) { 28 print("| <a href=\"".$this->href("acls")."\">Edit ACLs</a>\n"); 29 } 40 30 } 41 31 -
modules/common/wiki/php-files/modules/wiki/index.php
r836 r862 8 8 require_once dirname(__FILE__)."/../../includes/core_functions.php"; 9 9 require_once PATH_ROOT."/includes/theme_functions.php"; 10 11 /*---------------------------------------------------+12 | Image uploads - handling and preparation |13 +----------------------------------------------------*/14 $variables[] = array();15 16 // load the locale for this module17 include PATH_LOCALE.LOCALESET."admin/image_uploads.php";18 19 $variables['image_cats'][] = array('folder' => "wiki", 'name' => 'Wiki', 'path' => PATH_IMAGES."wiki/", 'selected' => true);20 $ufolder = IMAGES."wiki/";21 $afolder = PATH_IMAGES."wiki/";22 23 if (isset($status)) {24 if ($status == "upn") {25 $title = $locale['420'];26 $variables['message'] = $locale['425'];27 } elseif ($status == "upy") {28 $title = $locale['420'];29 $variables['message'] = "<img src='".$ufolder.$img."' alt='$img' /><br /><br />".$locale['426'];30 }31 // define the message panel variables32 $variables['bold'] = true;33 $template_panels[] = array('type' => 'body', 'name' => 'wiki.upload.status', 'title' => $title, 'template' => '_message_table_panel.tpl');34 $template_variables['wiki.upload.status'] = $variables;35 $variables = array();36 }37 38 // if a file is uploaded, process it39 if (isset($_POST['uploadimage'])) {40 $error = "";41 $image_types = array(42 ".gif",43 ".GIF",44 ".jpeg",45 ".JPEG",46 ".jpg",47 ".JPG",48 ".png",49 ".PNG"50 );51 $imgext = strrchr($_FILES['myfile']['name'], ".");52 $imgname = $_FILES['myfile']['name'];53 $imgsize = $_FILES['myfile']['size'];54 $imgtemp = $_FILES['myfile']['tmp_name'];55 if (!in_array($imgext, $image_types)) {56 redirect(FUSION_REQUEST);57 } elseif (is_uploaded_file($imgtemp)){58 include PATH_INCLUDES."photo_functions_include.php";59 $imgname = image_exists($afolder, substr("000000".$userdata['user_id'],-6).'_'.$imgname);60 move_uploaded_file($imgtemp, $afolder.$imgname);61 chmod($afolder.$imgname,0644);62 redirect(FUSION_REQUEST);63 }64 }65 66 /*---------------------------------------------------+67 | Locale definition for this installation module |68 +----------------------------------------------------*/69 70 if (file_exists(PATH_MODULES."wiki/locale/".$settings['locale'].".php")) {71 include PATH_MODULES."wiki/locale/".$settings['locale'].".php";72 } else {73 include PATH_MODULES."wiki/locale/English.php";74 }75 10 76 11 /** … … 437 372 $template_panels[] = array('type' => 'body', 'title' => $wakkaConfig['wakka_name'], 'name' => 'wiki', 'template' => '_custom_html.tpl'); 438 373 $template_variables['wiki'] = $variables; 439 440 // in edit mode? Allow image uploads 441 if (iMEMBER && $method == "edit") { 442 $variables['ifolder'] = $ifolder; 443 $variables['view'] = isset($view) ? $view : ""; 444 445 if (isset($view)) { 446 $image_ext = strrchr($afolder.$view,"."); 447 if (in_array($image_ext, array(".gif",".GIF",".jpg",".JPG",".jpeg",".JPEG",".png",".PNG"))) { 448 $variables['view_image'] = $ufolder.$view; 449 } else { 450 $variables['view_image'] = ""; 451 } 452 } else { 453 $variables['image_list'] = makefilelist($afolder, ".|..|imagelist.js|index.php", true); 454 } 455 $template_panels[] = array('type' => 'body', 'name' => 'modules.wiki.upload', 'template' => 'modules.wiki.upload.tpl', 'locale' => PATH_LOCALE.LOCALESET."admin/image_uploads.php"); 456 $template_variables['modules.wiki.upload'] = $variables; 457 } 458 374 459 375 require_once PATH_THEME."/theme.php"; 460 376 } -
modules/common/wiki/php-files/modules/wiki/module_installer.php
r840 r862 179 179 180 180 // add a user group for this module 181 $mod_install_cmds[] = array('type' => 'db', 'value' => "INSERT INTO ##PREFIX##user_groups (group_ident, group_name, group_description, group_forumname, group_visible) VALUES (' $mod_admin_rights', 'Wiki Admins', 'Wiki Admins', 'Wiki Admin', '1')");182 $mod_install_cmds[] = array('type' => 'db', 'value' => "INSERT INTO ##PREFIX##user_groups (group_ident, group_description, group_forumname, group_visible) VALUES (' $mod_admin_rights', 'Wiki Editors', 'Wiki Editors', 'Wiki Editor', '1')");181 $mod_install_cmds[] = array('type' => 'db', 'value' => "INSERT INTO ##PREFIX##user_groups (group_ident, group_name, group_description, group_forumname, group_visible) VALUES ('".$mod_admin_rights."01', 'Wiki Admins', 'Wiki Admins', 'Wiki Admin', '1')"); 182 $mod_install_cmds[] = array('type' => 'db', 'value' => "INSERT INTO ##PREFIX##user_groups (group_ident, group_description, group_forumname, group_visible) VALUES ('".$mod_admin_rights."02', 'Wiki Editors', 'Wiki Editors', 'Wiki Editor', '1')"); 183 183 184 184 $mod_install_cmds[] = array('type' => 'function', 'value' => "install_wiki"); … … 200 200 201 201 // delete the user groups 202 $mod_uninstall_cmds[] = array('type' => 'db', 'value' => "DELETE FROM ##PREFIX##user_groups WHERE group_ name = 'Wiki Admins'");203 $mod_uninstall_cmds[] = array('type' => 'db', 'value' => "DELETE FROM ##PREFIX##user_groups WHERE group_ name = 'Wiki Editors'");202 $mod_uninstall_cmds[] = array('type' => 'db', 'value' => "DELETE FROM ##PREFIX##user_groups WHERE group_ident = '".$mod_admin_rights."01'"); 203 $mod_uninstall_cmds[] = array('type' => 'db', 'value' => "DELETE FROM ##PREFIX##user_groups WHERE group_ident = '".$mod_admin_rights."02'"); 204 204 205 205 $mod_install_cmds[] = array('type' => 'function', 'value' => "uninstall_wiki"); … … 211 211 function install_wiki() { 212 212 213 global $db_prefix ;213 global $db_prefix, $mod_admin_rights; 214 214 215 215 // get the group_id of the Wiki Admins group 216 $admins = dbarray(dbquery("SELECT group_id FROM ".$db_prefix."user_groups WHERE group_ name = 'Wiki Admins'"));216 $admins = dbarray(dbquery("SELECT group_id FROM ".$db_prefix."user_groups WHERE group_ident = '".$mod_admin_rights."01'")); 217 217 218 218 // add all webmasters to the wiki user table
Note: See TracChangeset
for help on using the changeset viewer.
