]> git.mjollnir.org Git - moodle.git/commitdiff
Removed $THEME from admin pages
authormoodler <moodler>
Tue, 25 Jan 2005 17:08:05 +0000 (17:08 +0000)
committermoodler <moodler>
Tue, 25 Jan 2005 17:08:05 +0000 (17:08 +0000)
17 files changed:
admin/auth.php
admin/backup.php
admin/blocks.php
admin/calendar.php
admin/config.php
admin/cron.php
admin/dst.html
admin/dst.php
admin/editor.php
admin/enrol.php
admin/filters.html
admin/index.php
admin/lang.php
admin/module.php
admin/modules.php
admin/register.php
admin/site.php

index 6a808835c070ad0b5d0be0e709660328ffc1e3d4..4393b7123c4ac17d069a5f109de5b2378269a6bf 100644 (file)
 
     echo "</b></p></center>";
         
-    print_simple_box_start("center", "100%", "$THEME->cellheading");
+    print_simple_box_start("center", "100%");
     print_heading($options[$auth]);
 
-    print_simple_box_start("center", "60%", "$THEME->cellcontent");
+    print_simple_box_start("center", "60%");
     print_string("auth_$auth"."description", "auth");
     print_simple_box_end();
 
index c461c0052321bdea93f25e252d09d183da36dfaf..a7747abfd8a58b673c4743a1a9666a75863adeb4 100644 (file)
     print_simple_box("<center>".get_string("adminhelpbackup")."</center>", "center", "50%");
     echo "<br />";
 
-    print_simple_box_start("center", "", "$THEME->cellheading");
+    print_simple_box_start("center");
 
     //Check for required functions...
-    if(!function_exists('utf8_encode')) {
-        print_simple_box("<font color=\"red\">You need to add XML support to your PHP installation</font>", "center", "70%", "$THEME->cellheading", "20", "noticebox");
+    if (!function_exists('utf8_encode')) {
+        notify("You need to add XML support to your PHP installation");
     } 
     include ("$CFG->dirroot/backup/config.html");
 
index 980b9c3e157dacdf593cf41512d9f2ce8755f49c..9c73c18ac62f0502c661d5f33e1c07f7ad4ef6f9 100644 (file)
 
 /// Print the table of all blocks
 
-    if (empty($THEME->custompix)) {
-        $pixpath = '../pix';
-        // [pj] This is not used anywhere, but I'm leaving it in for the future
-        //$modpixpath = '../mod';
-    } else {
-        $pixpath = '../theme/'.$CFG->theme.'/pix';
-        // [pj] This is not used anywhere, but I'm leaving it in for the future
-        //$modpixpath = '../theme/'.$CFG->theme.'/pix/mod';
-    }
-
     $table->head  = array ($strname, $strcourses, $strversion, $strhide.'/'.$strshow, $strmultiple, $strdelete, $strsettings);
     $table->align = array ('LEFT', 'RIGHT', 'LEFT', 'CENTER', 'CENTER', 'CENTER', 'CENTER');
     $table->wrap = array ('NOWRAP', '', '', '', '', '', '');
 
     foreach ($blockbyname as $blockname => $blockid) {
 
-        // [pj] This is not used anywhere, but I'm leaving it in for the future
-        //$icon = "<img src=\"$modpixpath/$block->name/icon.gif\" hspace="10" height="16" width="16" border="0">";
         $blockobject = $blockobjects[$blockid];
 
         $delete = '<a href="blocks.php?delete='.$blockid.'&sesskey='.$USER->sesskey.'">'.$strdelete.'</a>';
 
         if ($blocks[$blockid]->visible) {
             $visible = '<a href="blocks.php?hide='.$blockid.'&sesskey='.$USER->sesskey.'" title="'.$strhide.'">'.
-                       '<img src="'.$pixpath.'/i/hide.gif" style="height: 16px; width: 16px;" alt=\"\" /></a>';
+                       '<img src="'.$CFG->pixpath.'/i/hide.gif" style="height: 16px; width: 16px;" alt=\"\" /></a>';
         } else {
             $visible = '<a href="blocks.php?show='.$blockid.'&sesskey='.$USER->sesskey.'" title="'.$strshow.'">'.
-                       '<img src="'.$pixpath.'/i/show.gif" style="height: 16px; width: 16px;" alt=\"\" /></a>';
+                       '<img src="'.$CFG->pixpath.'/i/show.gif" style="height: 16px; width: 16px;" alt=\"\" /></a>';
             $class = ' class="dimmed_text"'; // Leading space required!
         }
         if ($blockobject->instance_allow_multiple()) {
index 07769806df4b0e63d0aebc29ebfa5df1d2e3c1c6..1e6b8be03815ac6b9e5277cd6e9584e53031d9f0 100644 (file)
 
     // Main display starts here
 
-    print_simple_box_start('center', '100%', $THEME->cellheading);
+    print_simple_box_start('center');
     include('./calendar.html');
     print_simple_box_end();
 
index 1bb3e71ab8f3e82e3eefb003af95f72e703320bd..01b8d498c7c722e1dd413196e17b223f630f31b0 100644 (file)
@@ -89,7 +89,7 @@
 
     $sesskey = !empty($USER->id) ? $USER->sesskey : '';
 
-    print_simple_box_start('center', '', "$THEME->cellheading");
+    print_simple_box_start('center');
     include('config.html');
     print_simple_box_end();
 
@@ -122,4 +122,4 @@ function validate_form(&$form, &$err) {
     return true;
 }
 
-?>
\ No newline at end of file
+?>
index c0c759c403be2b609ff2af9478ebc9957b42e722..6d2940860fed49fc7463c8a81fdacbfed75c2bc7 100644 (file)
     }
 
     if (!empty($CFG->enablerssfeeds)) {  //Defined in admin/variables page
-        if (file_exists("$CFG->dirroot/rss/rsslib.php")) {
-            include_once("$CFG->dirroot/rss/rsslib.php");
-            mtrace("Running rssfeeds if required...");
+        include_once("$CFG->libdir/rsslib.php");
+        mtrace("Running rssfeeds if required...");
 
-            if ( ! cron_rss_feeds()) {
-                mtrace("Something went wrong while generating rssfeeds!!!");
-            } else {
-                mtrace("Rssfeeds finished");
-            }
+        if ( ! cron_rss_feeds()) {
+            mtrace("Something went wrong while generating rssfeeds!!!");
+        } else {
+            mtrace("Rssfeeds finished");
         }
     }
 
index db1d9dd4359a8312e7f412030c3f4ffcd2d00199..3801e1c796e7de880c274f385de89c811938b631 100644 (file)
         ?>
         </div>
       </td>
-      <td style="vertical-align: middle;">
-        <div id="dstdisplayboard" style="display: none; margin: 1em; padding: 5px; border: 1px black solid; text-align: center; background-color: <?php echo $THEME->cellcontent; ?>; -moz-border-radius: 4px;"> </div>
-        <div style="text-align: center; margin: 1em;">
+      <td style="vertical-align: middle;text-align: center;">
           <input type="submit" name="mode_add" value="<?php print_string('add'); ?>..." />
           <input type="submit" name="mode_edit" value="<?php print_string('edit'); ?>" <?php if(empty($presets)) echo 'disabled="disabled"';?> />
           <input type="submit" name="mode_delete" value="<?php print_string('delete'); ?>" <?php if(empty($presets)) echo 'disabled="disabled"';?> />
-        </div>
       </td>
     </tr>
   </tbody>
index 484b1c324250828f9cb5c4743edfdc9b45e0461f..c27c3e97c0348ebe24c487d0bb665215d1bebcf7 100644 (file)
                  6 => get_string('saturday', 'calendar')
             );
             print_heading(get_string('editingdstpreset', 'admin'));
-            print_simple_box_start('center', '70%', $THEME->cellheading);
+            print_simple_box_start('center', '70%');
             include('./dst_edit.html');
             print_simple_box_end();
 
             }
         }
         print_heading($strcalendardstpresets);
-        print_simple_box_start('center', '70%', $THEME->cellheading);
+        print_simple_box_start('center', '70%');
         include('./dst.html');
         print_simple_box_end();
     }
index 4ee3e8143e0489ba393d484ef144eda9e1b021ce..e778526119c1f68479a44254f2e71ceada5369e4 100644 (file)
@@ -39,7 +39,7 @@
         print_heading($streditorsettings);
         print_simple_box("<center>$streditorsettingshelp</center>","center","50%");
         print("<br />\n");
-        print_simple_box_start("center", "", "$THEME->cellheading");
+        print_simple_box_start("center");
         include("editor.html");
         print_simple_box_end();
         print_footer();
index e373a7e866649a98db6c1b15d8ac2181dce0c278..94ef20c0e8d025f06291869006b0e1b16552e0ba 100644 (file)
     echo "</b></p></div>";
     
 /// Print current enrolment type description    
-    print_simple_box_start("center", "80%", "$THEME->cellheading");
+    print_simple_box_start("center", "80%");
     print_heading($options[$enrol]);
 
-    print_simple_box_start("center", "60%", "$THEME->cellcontent");
+    print_simple_box_start("center", "60%");
     print_string("description", "enrol_$enrol");
     print_simple_box_end();
 
index fb84bc93b16caffb456db82775851b1da0e69220..70355ed46a3d3248eeee23a9e54ed9d4b6c4b380 100644 (file)
@@ -1,4 +1,4 @@
-<?php print_simple_box_start("center", "", "$THEME->cellheading"); ?>
+<?php print_simple_box_start("center"); ?>
 
 <form name="filters" id="filters" method="post" action="filters.php">
 <input type="hidden" name="sesskey" value="<?php echo $USER->sesskey ?>">
@@ -78,7 +78,7 @@
 <br />
 
 
-<?php print_simple_box_start("center", "", "$THEME->cellheading"); ?>
+<?php print_simple_box_start("center"); ?>
 
 <form name="options" id="options" method="post" action="filters.php">
 <input type="hidden" name="sesskey" value="<?php echo $USER->sesskey ?>">
index 12eb774d0124ee035fac18f59281f1e5310669a5..c8983918adf63b4c34a5fab33690cd0b9985af39 100644 (file)
 
     $stradministration = get_string("administration");
     print_header("$site->shortname: $stradministration","$site->fullname", "$stradministration");
-    print_simple_box_start("center", "100%", "$THEME->cellcontent2", 20);
+    print_simple_box_start('center', '100%', '', 20);
     print_heading($stradministration);
 
     if (!empty($CFG->upgrade)) {  // Print notice about extra upgrading that needs to be done
index 9be450d173a63a6070daca10dfbb2866ccc8319b..b568d0c1a9fbd637286b2b4327fa9e82aaeca7a3 100644 (file)
         if ($editable) {
             echo "<form name=\"$currentfile\" action=\"lang.php\" method=\"post\">";
         }
-        echo "<table width=\"100%\" cellpadding=\"2\" cellspacing=\"3\" border=\"0\">";
+        echo "<table width=\"100%\" cellpadding=\"2\" cellspacing=\"3\" border=\"0\" class=\"generalbox\">";
         foreach ($enstring as $key => $envalue) {
             $envalue = nl2br(htmlspecialchars($envalue));
             $envalue = preg_replace('/(\$a\-\&gt;[a-zA-Z0-9]*|\$a)/', '<b>$0</b>', $envalue);  // Make variables bold. 
             $envalue = str_replace("%%","%",$envalue);
             $envalue = str_replace("\\","",$envalue);              // Delete all slashes
 
-            echo "\n\n<tr>";
-            echo "<td dir=\"ltr\" lang=\"en\" width=\"20%\" bgcolor=\"$THEME->cellheading\" nowrap=\"nowrap\" valign=\"top\">$key</td>\n";
-            echo "<td dir=\"ltr\" lang=\"en\" width=\"40%\" bgcolor=\"$THEME->cellheading\" valign=\"top\">$envalue</td>\n";
+            echo "\n\n".'<tr>';
+            echo '<td dir="ltr" lang="en" width="20%" nowrap="nowrap" valign="top">'.$key.'</td>'."\n";
+            echo '<td dir="ltr" lang="en" width="40%" valign="top">'.$envalue.'</td>'."\n";
 
             $value = $string[$key];
             $value = str_replace("\r","",$value);              // Bad character caused by Windows
             $value = str_replace(">","&gt;",$value);
             $value = str_replace('"',"&quot;",$value);
 
-            $cellcolour = $value ? $THEME->cellcontent: $THEME->highlight;
+            $cellcolour = $value ? '': 'class="highlight"';
 
             if ($editable) {
-                echo "<td width=\"40%\" bgcolor=\"$cellcolour\" valign=\"top\">\n";
+                echo '<td width="40%" '.$cellcolour.' valign="top">'."\n";
                 if (isset($string[$key])) {
                     $valuelen = strlen($value);
                 } else {
                 $cols=50;
                 if (strstr($value, "\r") or strstr($value, "\n") or $valuelen > $cols) {
                     $rows = ceil($valuelen / $cols);
-                    echo "<textarea name=\"string-$key\" cols=\"$cols\" rows=\"$rows\">$value</textarea>\n";
+                    echo '<textarea name="string-'.$key.'" cols="'.$cols.'" rows="'.$rows.'">'.$value.'</textarea>'."\n";
                 } else {
                     if ($valuelen) {
                         $cols = $valuelen + 2;
                     }
-                    echo "<input type=\"text\" name=\"string-$key\" value=\"$value\" size=\"$cols\"></td>";
+                    echo '<input type="text" name="string-'.$key.'" value="'.$value.'" size="'.$cols.'"></td>';
                 }
-                echo "</td>\n";
+                echo '</td>';
 
             } else {
-                echo "<td width=\"40%\" bgcolor=\"$cellcolour\" valign=\"top\">$value</td>\n";
+                echo '<td width="40%" bgcolor="'.$cellcolour.'" valign="top">'.$value.'</td>';
             }
         }
         if ($editable) {
-            echo "<tr><td colspan=\"2\">&nbsp;<td><br />";
+            echo '<tr><td colspan="2">&nbsp;<td><br />';
             echo '<input type="hidden" name="sesskey" value="'.$USER->sesskey.'" />';
-            echo "    <input type=\"hidden\" name=\"currentfile\" value=\"$currentfile\">";
-            echo "    <input type=\"hidden\" name=\"mode\" value=\"compare\">";
-            echo "    <input type=\"submit\" name=\"update\" value=\"".get_string("savechanges").": $currentfile\">";
-            echo "</td></tr>";
+            echo '    <input type="hidden" name="currentfile" value="'.$currentfile.'">';
+            echo '    <input type="hidden" name="mode" value="compare">';
+            echo '    <input type="submit" name="update" value="'.get_string('savechanges').': '.$currentfile.'">';
+            echo '</td></tr>';
         }
-        echo "</table>";
-        echo "</form>";
+        echo '</table>';
+        echo '</form>';
 
     }
 
index 71c052b29a104b7b0cb1e9b68db0e12f44d33ede..d32b0d314b16da4a1de2c97edc653a232e9fb4fe 100644 (file)
@@ -51,7 +51,7 @@
     print_simple_box("<center>".get_string("configwarning")."</center>", "center", "50%");
     echo "<br />";
 
-    print_simple_box_start("center", "", "$THEME->cellheading");
+    print_simple_box_start("center", "");
        include("$CFG->dirroot/mod/$module/config.html");
     print_simple_box_end();
 
index 094629f785484c9ba1a3bbd10551311155fb775b..a3d6f03e8388c5f057fd8395f3e1cc637bb69ed6 100644 (file)
 
 /// Print the table of all modules
 
-    if (empty($THEME->custompix)) {
-        $pixpath = "../pix";
-        $modpixpath = "../mod";
-    } else {
-        $pixpath = "../theme/$CFG->theme/pix";
-        $modpixpath = "../theme/$CFG->theme/pix/mod";
-    }
-
     $table->head  = array ($stractivitymodule, $stractivities, $strversion, "$strhide/$strshow", $strdelete, $strsettings);
     $table->align = array ("LEFT", "RIGHT", "LEFT", "CENTER", "CENTER", "CENTER");
     $table->wrap = array ("NOWRAP", "", "", "", "","");
 
     foreach ($modulebyname as $modulename => $module) {
 
-        $icon = "<img src=\"$modpixpath/$module->name/icon.gif\" hspace=\"10\" height=\"16\" width=\"16\" border=\"0\" alt=\"\" />";
+        $icon = "<img src=\"$CFG->modpixpath/$module->name/icon.gif\" hspace=\"10\" height=\"16\" width=\"16\" border=\"0\" alt=\"\" />";
 
         $delete = "<a href=\"modules.php?delete=$module->name&sesskey=$USER->sesskey\">$strdelete</a>";
 
 
         if ($module->visible) {
             $visible = "<a href=\"modules.php?hide=$module->name&amp;sesskey=$USER->sesskey\" title=\"$strhide\">".
-                       "<img src=\"$pixpath/i/hide.gif\" align=\"middle\" height=\"16\" width=\"16\" border=\"0\" alt=\"\" /></a>";
+                       "<img src=\"$CFG->pixpath/i/hide.gif\" align=\"middle\" height=\"16\" width=\"16\" border=\"0\" alt=\"\" /></a>";
             $class = "";
         } else {
             $visible = "<a href=\"modules.php?show=$module->name&amp;sesskey=$USER->sesskey\" title=\"$strshow\">".
-                       "<img src=\"$pixpath/i/show.gif\" align=\"middle\" height=\"16\" width=\"16\" border=\"0\" alt=\"\" /></a>";
+                       "<img src=\"$CFG->pixpath/i/show.gif\" align=\"middle\" height=\"16\" width=\"16\" border=\"0\" alt=\"\" /></a>";
             $class = "class=\"dimmed_text\"";
         }
         if ($module->name == "forum") {
index b2c47b85562581e8e9191f96af56b75dc5e14472..dd288fc591f9f6191a5f7160ac267e0f7dc48c3b 100644 (file)
@@ -47,7 +47,7 @@
 
 /// Print the form
 
-    print_simple_box_start("center", "", "$THEME->cellheading");
+    print_simple_box_start("center", "");
 
     echo "<form name=\"form\" action=\"http://moodle.org/register/\" method=\"post\">\n";
     echo "<table cellpadding=\"9\" border=\"0\">\n";
index b95ca458dce40a62617d625368457fcc8c9e0e76..a0959c009df24a13934a1d87e68048ab640374a4 100644 (file)
     $usehtmleditor = can_use_html_editor();
     $defaultformat = FORMAT_HTML;
 
-    print_simple_box_start("center", "", "$THEME->cellheading");
+    print_simple_box_start("center", "");
     include("site.html");
     print_simple_box_end();