Changeset 1530 for branches/multiuser/admin
- Timestamp:
- 08/11/06 02:20:30 (2 years ago)
- Location:
- branches/multiuser/admin
- Files:
-
- 6 modified
-
channels.php (modified) (4 diffs)
-
folders.php (modified) (1 diff)
-
index.php (modified) (1 diff)
-
items.php (modified) (4 diffs)
-
opml.php (modified) (1 diff)
-
themes.php (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/multiuser/admin/channels.php
r1518 r1530 45 45 46 46 echo "<label for=\"add_channel_to_folder\">". LBL_ADMIN_IN_FOLDER . "</label>\n"; 47 folder_combo('add_channel_to_folder');47 echo rss_toolkit_folders_combo('add_channel_to_folder'); 48 48 echo "<label for=\"channel_tags\">" . LBL_TAG_FOLDERS . ":</label>\n"; 49 49 echo "<input type=\"text\" name=\"channel_tags\" id=\"channel_tags\" />\n"; … … 139 139 $dead = true; 140 140 } else { 141 $dead = (time() - strtotime($daterefreshed) > getConfig('rss.config.deadthreshhold')*60 ? true : false);141 $dead = (time() - strtotime($daterefreshed) > getConfig('rss.config.deadthreshhold')*60*60 ? true : false); 142 142 } 143 143 … … 187 187 ."<legend>Selected...</legend>\n" 188 188 ."<p>\n" 189 ."<label for=\"me_folder\">".LBL_ADMIN_CHANNEL_FOLDER."</label>\n" ;190 folder_combo('me_folder',null);189 ."<label for=\"me_folder\">".LBL_ADMIN_CHANNEL_FOLDER."</label>\n" 190 .rss_toolkit_folders_combo('me_folder',null); 191 191 192 192 echo … … 785 785 786 786 // Folder 787 ."<p><label for=\"c_parent\">". LBL_ADMIN_CHANNEL_FOLDER ."</label>\n" ;788 789 folder_combo('c_parent',$parent);790 echo"</p>\n";787 ."<p><label for=\"c_parent\">". LBL_ADMIN_CHANNEL_FOLDER ."</label>\n" 788 789 .rss_toolkit_folders_combo('c_parent',$parent) 790 ."</p>\n"; 791 791 792 792 // Tags -
branches/multiuser/admin/folders.php
r1495 r1530 128 128 129 129 } 130 131 function folder_combo($name, $selected = -1) {132 echo "\n<select name=\"$name\" id=\"$name\">\n";133 if (getConfig('rss.config.absoluteordering')) {134 $sql = " order by position asc";135 } else {136 $sql = " order by name asc";137 }138 $res = rss_query("select id, name from " .getTable("folders") . $sql);139 while (list($id, $name) = rss_fetch_row($res)) {140 echo "\t<option value=\"$id\""141 .($selected > -1 && $selected == $id ? " selected=\"selected\"":"")142 .">" . (($name == "")?LBL_HOME_FOLDER:$name) ."</option>\n";143 }144 echo "</select>\n";145 }146 147 148 130 149 131 function folder_admin() { -
branches/multiuser/admin/index.php
r1502 r1530 43 43 require_once('themes.php'); 44 44 require_once('tags.php'); 45 require_once('../cls/wrappers/toolkit.php'); 45 46 46 47 define ('CST_ADMIN_DOMAIN','domain'); -
branches/multiuser/admin/items.php
r1275 r1530 25 25 # 26 26 ############################################################################### 27 28 rss_require('cls/wrappers/toolkit.php'); 27 29 28 30 /** … … 45 47 . "<option>" . LBL_ADMIN_PRUNE_YEARS . "</option>\n" 46 48 . "</select></p>\n" 49 . "<p>\n" 50 . rss_toolkit_channels_combo("prune_channel") . "\n" 51 . "</p>\n" 47 52 . "<p><label for=\"prune_include_sticky\">".LBL_ADMIN_PRUNE_INCLUDE_STICKY."</label>\n" 48 53 . "<input type=\"checkbox\" id=\"prune_include_sticky\" name=\"prune_include_sticky\" value=\"1\"/></p>\n" … … 91 96 break; 92 97 } 93 $sql = " from ".getTable('item') ." i , " .getTable('channels') . " c"98 $sql = " from ".getTable('item') ." i INNER JOIN " .getTable('channels') . " c ON c.id=i.cid " 94 99 ." where 1=1 "; 100 101 if (array_key_exists('prune_channel', $_REQUEST)) { 102 if(ALL_CHANNELS_ID != $_REQUEST['prune_channel']) { 103 $sql .= " and c.id = " . $_REQUEST['prune_channel'] . ""; 104 } 105 } 95 106 96 107 if ($prune_older > 0) { … … 135 146 } 136 147 } 137 138 148 139 149 if (array_key_exists(CST_ADMIN_CONFIRMED,$_REQUEST)) { -
branches/multiuser/admin/opml.php
r1181 r1530 68 68 69 69 ."<p style=\"padding-left:1em;\"><input type=\"radio\" id=\"opml_import_option_folder\" name=\"opml_import_option\" value=\"".CST_ADMIN_OPML_IMPORT_FOLDER."\" />\n" 70 ."<label for=\"opml_import_option_folder\" >".LBL_ADMIN_OPML_IMPORT_FOLDER."</label>" ;71 folder_combo('opml_import_to_folder',null);72 echo"</p>\n"70 ."<label for=\"opml_import_option_folder\" >".LBL_ADMIN_OPML_IMPORT_FOLDER."</label>" 71 .rss_toolkit_folders_combo('opml_import_to_folder',null) 72 ."</p>\n" 73 73 74 74 ."<p style=\"padding-left:1em;\"><input type=\"radio\" id=\"opml_import_option_wipe\" name=\"opml_import_option\" value=\"".CST_ADMIN_OPML_IMPORT_WIPE."\" />\n" 75 75 ."<label for=\"opml_import_option_wipe\" >".LBL_ADMIN_OPML_IMPORT_WIPE."</label></p>\n" 76 77 76 78 77 .""; -
branches/multiuser/admin/themes.php
r1372 r1530 45 45 $active_theme= getConfig('rss.output.theme'); 46 46 } 47 48 echo "<form style=\"float:right\" method=\"post\" action=\"" .$_SERVER['PHP_SELF'] ."\">\n" 49 . "<p><input type=\"hidden\" name=\"".CST_ADMIN_DOMAIN."\" value=\"".CST_ADMIN_DOMAIN_THEMES."\" />\n" 50 ."<input type=\"submit\" name=\"admin_themes_check_for_updates\" value=\"".LBL_ADMIN_CHECK_FOR_UPDATES."\" /></p>\n" 51 . "</form>\n"; 52 if (isset($_POST['admin_themes_check_for_updates'])) { 53 theme_getThemesUpdate(&$themes); 54 } 47 55 48 56 echo "<h2 class=\"trigger\">".LBL_ADMIN_THEMES."</h2>\n" … … 61 69 } 62 70 $active = ($entry == $active_theme); 71 $updateAvailable = isset($theme['updateVersion']); 63 72 if ($screenshot) { 64 73 $screenshotURL = "<img src=\"". getPath() . RSS_THEME_DIR . "/$fsname/$screenshot\" />"; … … 68 77 $h4="$name"; 69 78 $h5="By $author | Version: $version"; 79 if ($updateAvailable) { 80 $h5 .= ' | <a class="update" href="'.$theme['updateUrl'].'">Update to version ' .$theme['updateVersion'] .'</a>'; 81 } 82 70 83 if ($htmltheme) { 71 84 $seturl = "index.php?view=themes&theme=$entry"; … … 73 86 $seturl = ""; 74 87 } 75 echo "<div class=\"themeframe".($active?" active":""). "\"><span>";88 echo "<div class=\"themeframe".($active?" active":""). ($updateAvailable?" hilite":"")."\"><span>"; 76 89 if (!$active && $htmltheme) { 77 90 echo "<a href=\"$seturl\" class=\"bookmarklet\">".LBL_ADMIN_USE_THIS_THEME."</a>"; … … 399 412 } 400 413 414 function theme_getThemesUpdate(&$themes) { 415 $themesxml = array(); 416 global $themesxml; 417 $xml = getUrl('http://themes.gregarius.net/api.php'); 418 $xml = str_replace("\r", '', $xml); 419 $xml = str_replace("\n", '', $xml); 420 421 $xp = xml_parser_create() or rss_error("couldn't create parser"); 422 423 xml_set_element_handler($xp, 'themes_xml_startElement', 'themes_xml_endElement') 424 or rss_error("couldnt set XML handlers"); 425 426 xml_parse($xp, $xml, true) or rss_error("failed parsing xml"); 427 xml_parser_free($xp) or rss_error("failed freeing the parser"); 428 if (is_array($themesxml)) { 429 foreach($themesxml as $theme => $data) { 430 list($tversion,$turl) = $data; 431 if (isset($themes[$theme]) && $themes[$theme]['version'] < $tversion) { 432 $themes[$theme]['updateVersion'] = $tversion; 433 $themes[$theme]['updateUrl'] = $turl; 434 } 435 } 436 } 437 } 438 439 function themes_xml_startElement($xp, $element, $attr) { 440 global $themesxml; 441 442 if ($element == 'THEME' && 443 array_key_exists('PID',$attr) && 444 array_key_exists('URL',$attr) && 445 array_key_exists('VERSION',$attr)) { 446 447 $themesxml[$attr['PID']] = array($attr['VERSION'],$attr['URL']); 448 } 449 } 450 451 function themes_xml_endElement($xp, $element) { 452 ///global $pluginsxml; 453 return; 454 } 455 401 456 ?>
