print "<input type='radio' value='MOVE' name='action'" . ($_REQUEST['action'] == "MOVE" ? " checked='checked'" : "") . " onclick=\"updateForm('move')\" /> Move"; } print "</td>"; print "</tr> "; } print "<tr>"; print "<th style='text-align: left;' colspan='1'>"; if (!$_REQUEST['domove']) { print ucwords($actionlc) . " " . ucwords($_SESSION['type']); print " to:"; } else { print ucwords($actionlc) . " " . ucwords($_SESSION['type']) . " Successfull"; } print "</th>"; print "<th style='text-align: right'>"; print helplink("copy_parts"); print "</th>"; print "</tr>"; /****************************************************************************** * print out the Site row ******************************************************************************/ print "<tr>"; print "<td style='text-align: left;'>Site: </td>"; print "<td style='text-align: left'>"; if (!$_REQUEST['domove']) { print "<select name='site' onchange=\"updateForm('site')\" style='"; if ($siteObj->name == $_SESSION['origSite'] && $_REQUEST['action'] == "MOVE" && $_SESSION['type'] == "section") { print "background-color: #F33;"; $cantmovehere = 1; $cantmovereason = "You can not move this section to the same place it exists. Try copying or moving to a new location instead."; }
} </style> <?php print $content; $sections = decode_array($sa['sections']); if ($_REQUEST['show'] == 'wiki') { print "<table cellspacing='1' width='100%'>"; print "<tr><td >"; print "<div style='font-size: 11px;'>"; print "Any of the titles below can be used to create a wiki link. Simply copy and\n\tpaste a title into the Segue editor. <br /><br />"; print "</div>"; print "<div style='font-size: 10px;'>"; print "<i>(The double brackets indicate a wiki link. For example, if you have a page \n\twhose title is \"Introduction\", to make a link to that page, use [[introduction]].)</i>"; print "<br />For more information, see:" . helplink('wiki'); print "</div>"; print "</td></tr>"; print "</table>"; } print "<table cellspacing='1' width='100%'>"; print "<tr>"; print "<th>Site Map - " . $siteObj->getField("title") . "</th>"; print "</tr>"; /****************************************************************************** * print out site/section/page/story name & link ******************************************************************************/ $siteObj->fetchDown(); doEditorLine($siteObj); $sections =& $siteObj->sections; if ($sections) {
function edit($message = '') { kprintheader(''); ?> <form name="randomizer" method="post" action="<?php echo PHPSELF; ?> "> <input type="hidden" name="action" value="radio_save"/> <input type="hidden" name="stationid" value="<?php echo $this->stationid; ?> "/> <input type="hidden" name="reload" value="<?php $this->reload; ?> "/> <table width="95%" align="center" border="0" cellspacing="2" cellpadding="0"> <tr> <td class="importnant" colspan="2"><?php echo $message; ?> </td> </tr> <tr> <td class="wtext"><?php echo get_lang(54); ?> </td> <td><input type="text" class="fatbuttom" size="30" maxlength="64" name="name" value="<?php echo checkchs($this->name); ?> "/></td> <td valign="top" class="wtext"><?php echo helplink('radioname'); ?> </td> </tr> <tr> <td class="wtext"><?php echo get_lang(214); ?> </td> <td><?php echo $this->getlist(); ?> </td> <td valign="top" class="wtext"><?php echo helplink('radioplaylist'); ?> </td> </tr> <tr> <td class="wtext"><?php echo get_lang(100); ?> </td> <td><input type="text" class="fatbuttom" size="15" maxlength="64" name="pass" value="<?php echo $this->pass; ?> "/></td> <td valign="top" class="wtext"><?php echo helplink('radiopass'); ?> </td> </tr> <tr> <td class="wtext"><?php echo get_lang(344); ?> </td> <td><input type="checkbox" name="loop" value="1" <?php echo checked($this->loop); ?> class="fatbuttom"/></td> <td valign="top" class="wtext"><?php echo helplink('radioloop'); ?> </td> </tr> <tr> <td height="2"></td> </tr> <tr> <td></td> <td> <input class="fatbuttom" type="submit" name="save" value="<?php echo get_lang(45); ?> "/> <input type="button" class="fatbuttom" name="close" value="<?php echo get_lang(27); ?> " onclick="javascript: window.close(); <?php if ($this->reload) { echo 'window.opener.location.reload();'; } ?> "/> </td> <td class="wtext" align="right"><?php echo get_lang(191); ?> </td> </tr> <tr> <td colspan="3" align="right"> <?php if ($this->stationid != 0) { ?> <input type="submit" name="deleteradio" onclick="javascript: if (!confirm('<?php echo get_lang(210); ?> ')) return false;" value="<?php echo get_lang(43); ?> " class="fatbuttom"/> <?php } ?> </td> </tr> </table> </form> <?php kprintend(); }
case 'text': $topics[$i] = helplink('text', get_string('helptext')); break; default: error('Unknown help topic ' . $item); } } else { $keyword = optional_param("keyword{$i}", '', PARAM_ALPHAEXT); if ('' == $keyword) { break; //exit for loop - no more help items } $title = optional_param("title{$i}", '', PARAM_NOTAGS); $module = optional_param("module{$i}", 'moodle', PARAM_ALPHAEXT); $func[$i] = 'helpbutton'; $topics[$i] = helplink($keyword, $title, $module); } } print_header(); print_simple_box_start('center', '96%'); print_heading(get_string('editorhelptopics')); echo '<ul>'; foreach ($topics as $i => $topic) { echo '<li>' . $topics[$i] . '</li>'; } echo '</ul>'; print_simple_box_end(); // End of page. close_window_button(); global $CFG; echo '<p align="center"><a href="' . $CFG->wwwroot . '/help.php?file=index.html">' . get_string('helpindex') . '</a></p>';
function action_pluginlist() { global $member, $manager; // check if allowed $member->isAdmin() or $this->disallow(); $this->pagehead(); echo '<p><a href="index.php?action=manage">(', _BACKTOMANAGE, ')</a></p>'; echo '<h2>', _PLUGS_TITLE_MANAGE, ' ', help('plugins'), '</h2>'; echo '<h3>', _PLUGS_TITLE_INSTALLED, ' <span style="font-size:smaller">', helplink('getplugins'), _PLUGS_TITLE_GETPLUGINS, '</a></span></h3>'; $query = 'SELECT * FROM ' . sql_table('plugin') . ' ORDER BY porder ASC'; $template['content'] = 'pluginlist'; $template['tabindex'] = 10; showlist($query, 'table', $template); ?> <h3><?php echo _PLUGS_TITLE_UPDATE; ?> </h3> <p><?php echo _PLUGS_TEXT_UPDATE; ?> </p> <form method="post" action="index.php"><div> <input type="hidden" name="action" value="pluginupdate" /> <?php $manager->addTicketHidden(); ?> <input type="submit" value="<?php echo _PLUGS_BTN_UPDATE; ?> " tabindex="20" /> </div></form> <h3><?php echo _PLUGS_TITLE_NEW; ?> </h3> <?php // find a list of possibly non-installed plugins $candidates = array(); global $DIR_PLUGINS; $dirhandle = opendir($DIR_PLUGINS); while ($filename = readdir($dirhandle)) { # replaced ereg() below with preg_match(). ereg* functions are deprecated in PHP 5.3.0 # original ereg: ereg('^NP_(.*)\.php$',$filename,$matches) if (preg_match('#^NP_(.*)\\.php$#', $filename, $matches)) { $name = $matches[1]; // only show in list when not yet installed $res = sql_query('SELECT * FROM ' . sql_table('plugin') . ' WHERE `pfile` = "NP_' . sql_real_escape_string($name) . '"'); if (sql_num_rows($res) == 0) { array_push($candidates, $name); } } } closedir($dirhandle); if (sizeof($candidates) > 0) { ?> <p><?php echo _PLUGS_ADD_TEXT; ?> </p> <form method='post' action='index.php'><div> <input type='hidden' name='action' value='pluginadd' /> <?php $manager->addTicketHidden(); ?> <select name="filename" tabindex="30"> <?php foreach ($candidates as $name) { echo '<option value="NP_', $name, '">', htmlspecialchars($name), '</option>'; } ?> </select> <input type='submit' tabindex="40" value='<?php echo _PLUGS_BTN_INSTALL; ?> ' /> </div></form> <?php } else { echo '<p>', _PLUGS_NOCANDIDATES, '</p>'; } $this->pagefoot(); }
$css = $themesettings['css'] = $_REQUEST['css']; } else { $themesettings['css'] = $css; } } if ($_REQUEST['nav_arrange']) { $nav_arrange = $themesettings['nav_arrange'] = $_REQUEST['nav_arrange']; } else { $themesettings['nav_arrange'] = $nav_arrange; } } ?> <b>Custom CSS</b><br /> Enter your custom CSS <?php print helplink("customcss", "?"); ?> into the text box. <textarea name='css' cols='43' rows='20'><?php print $css; ?> </textarea> <br/><input type='submit' value='Update Preview'/> <input type='button' value='Restore Defaults' onclick="if (confirm('Are you sure you want to loose your changes and restore the default CSS?')) {this.nextSibling.value='true'; this.form.submit();}"/><input type='hidden' name='restore' value=''/> <hr noshade size='1' /> <?php //All settings for Navigation are included here ?> <table width="95%" border="0" cellpadding="0" cellspacing="5"></td></tr>
} if (count($sites)) { foreach (array_keys($sites) as $name) { printSiteLine2($sites[$name]); } } unset($sites); } } /****************************************************************************** * sites where the user is an Editor ******************************************************************************/ if ($_SESSION["expand_editorsites"] == 0) { printc("\n\t\t<tr>\n\t\t\t<td class='inlineth' colspan='2'><a href='{$PHP_SELF}?expand_editorsites=true'>+</a> Sites you can edit" . helplink("othersites", "?") . "</td>\n\t\t</tr>"); } else { printc("\n\t\t<tr>\n\t\t\t<td class='inlineth' colspan='2'><a href='{$PHP_SELF}?expand_editorsites=false'>-</a> Sites you can edit" . helplink("othersites", "?") . "</td>\n\t\t</tr>"); } if ($_SESSION["expand_editorsites"]) { $sites = array(); if (is_array($anyLevelEditorSites)) { foreach (array_keys($anyLevelEditorSites) as $name) { $info =& $anyLevelEditorSites[$name]; if (!in_array($name, $sitesprinted) && ($info['hasPermissionDownA'] || $info['hasPermissionDownE'] || $info['hasPermissionDownD']) && $_SESSION['auser'] != $info['slot_owner']) { if ($allowclasssites && !$allowpersonalsites) { if ($info['slot_type'] != 'personal') { $sites[$name] =& $info; } } else { if (!$allowclasssites && $allowpersonalsites) { if ($info['slot_type'] == 'personal') { $sites[$name] =& $info;
<?php include "globals.php"; $costperticket = 10; $numoftickets = abs((int) $_POST['numoftickets']); print "\n<center><h2>Raffle</h2><hr width=98%>\n<center><br />"; die("The raffle is temporarily out of order. We're working on sorting out some bugs."); $rfs = $db->query("SELECT * FROM raffle_stats LIMIT 1"); $rf = $db->fetch_row($rfs); $tottickets = number_format($rf['tottickets']); if ($numoftickets > 0) { $totalcost = $costperticket * $numoftickets; $jackpot = $totalcost / 2; if ($totalcost > $ir['points']) { print "Sorry, you do not have {$totalcost} points."; $h->endpage(); die; } $db->query("UPDATE users SET points=points-{$totalcost} WHERE userid={$ir['userid']}"); $db->query("UPDATE raffle_stats SET tottickets=tottickets+{$numoftickets}, jackpot=jackpot+{$jackpot}"); print "You bought {$numoftickets} raffle tickets for {$totalcost} points.<br />><a href=raffle.php>Back</a>"; while ($numoftickets > 0) { $db->query("INSERT INTO raffle (userid) VALUES({$ir['userid']})"); $numoftickets = $numoftickets - 1; } } else { print "<font size=2><b>Current Prizes:</b> \$5 paypal, \$20 paypal, \$100 paypal, <a href='http://www.apple.com/ipodshuffle/features.html' target='_blank'>2 gig Ipod Shuffle</a></font><br />\n\t<br /><font size=1.5>Raffle tickets cost {$costperticket} points " . helplink(2) . " each. At the end of each month, winners are chosen.</font>\n\t<br /><br />\n\t<b><font size=2>Buy Raffle Tickets</font></b><br />\n\t<form method=post action='raffle.php'>\n\tHow many: <input type=text name='numoftickets' value=1><br />\n\t<input type=submit value='Buy Raffle Tickets'>\n\t</form>\n\t<br /><br />\n\tCurrently there have been {$tottickets} raffle tickets bought.\n\t"; } $h->endpage();
} print "\n\t\t\t\t</div>"; print "\n\t\t\t</td>"; print "\n\t\t</tr>"; /****************************************************************************** * Buttons: * back to form1 (editor choosing) ******************************************************************************/ $buttons = "\n\t\t<tr>"; $c = $totalcolumns - 1; $buttons .= "\n\t\t\t<td align='left' style='font-weight: bold'>"; if ($isOwner) { $buttons .= "\n\t\t\t\t<input type='submit' name='chooseeditors' value='<- Choose Editors' /> "; } $buttons .= "\n\t\t\t</td>\n\t\t\t<td align='left' colspan='{$c}'>"; $buttons .= "L = Locked; v = View; a = Add; e = Edit; d = Delete; " . helplink("editors", "help"); $buttons .= "</td>\n\t\t</tr>"; print $buttons; /****************************************************************************** * print out names of editors in top row ******************************************************************************/ print "\n\t\t<tr>\n\t\t\t<td class='collabel'>"; if (!$_SESSION[obj]->getField("active")) { print "\n\t\t\t\t<span style='color: #D00; font-size: 90%;'>This site is hidden. Hiding overides all View permissions.</span>"; } else { print " "; } print "\n\t\t\t</td>\n\t\t\t<td class='collabel'> </td>"; foreach ($_SESSION[editors] as $e) { print "\n\t\t\t<td colspan='4' class='edname collabel'>{$e}</td>"; }
if ($b[slot_uploadlimit]) { $dirlimit_B = $b[slot_uploadlimit]; } else { $dirlimit_B = $userdirlimit; } } else { $dirlimit_B = $userdirlimit; } } $dirlimit = convertfilesize($dirlimit_B); $percentused = round($totalsize / $dirlimit_B, "4") * 100; $percentfree = 100 - $percentused; $space = $dirlimit_B - $totalsize; $space = convertfilesize($space); //print "<div style='text-align: right;'>"; print helplink("filelibrary"); print "<br \\><br \\>"; print "<table cellspacing='0' cellpadding='1' align='right'>"; print "<tr><td class='sizebox1'>Total media allowed: </td><td class='sizebox2'> {$dirlimit}</td></tr>"; print "<tr><td class='sizebox1'>Total size of your media: </td><td class='sizebox2'> {$dirtotal}</td></tr>"; print "<tr><td class='sizebox1'>Space available: </td><td class='sizebox2' style='border-top: 1px solid #000'> {$space}</td></tr>"; print "<tr><td colspan='2'><table width='100%'><tr>"; if ($percentused == 0) { print "<td style='background-color: #00C; height: 5px;' width='100%'> </td>"; } else { if ($percentused == 100) { print "<td style='background-color: #F00; height: 5px;' width='100%'> </td>"; } else { print "<td style='background-color: #F00; height: 5px;' width='{$percentused}%'> </td><td style='background-color: #00C;' width='{$percentfree}%'> </td>"; } }
if ($thisSite->hasPermission("edit")) { print "\n\t<input type='button' style='width: {$btnw}; text-decoration: none;' class='button' value='Edit Site Settings' onclick=\"window.location='index.php?{$sid}&action=edit_site&sitename={$site}&comingFrom=viewsite'\" />"; } else { print "\n\t "; } print "\n\t</td>"; print "\n\t<td valign='top' align='left'>"; if (!ereg('preview_edit_as', $_REQUEST['action'])) { print "\n\t<input type='button' style='width: {$btnw}; text-decoration: none;' class='button' name='sitemap' value=' Permissions ' onclick='sendWindow(\"permissions\",600,400,\"edit_permissions.php?{$sid}&site={$site}\")' />"; } print "\n\t</td>"; print "\n\t<td valign='top' align='left'>"; print "\n\t<input type='button' style='width: {$btnw}; text-decoration: none;' class='button' value='View This Site' onclick=\"window.location='{$u}&{$sid}'\" />"; print "\n\t</td>"; print "\n\t<td valign='middle' align='center' rowspan='2'>"; print helplink("index"); print "\n\t</td>"; print "\n\t</tr><tr><td valign='top' align='left'>"; print "\n\t<input type='button' style='width: {$btnw}; text-decoration: none;' class='button' name='browsefiles' value=' Media Library ' onclick='sendWindow(\"filebrowser\",700,600,\"filebrowser.php?&editor=none&site={$site}&comingfrom=viewsite\")' />"; print "\n\t</td>"; print "\n\t<td valign='top' align='left'>"; print "\n\t<input type='button' style='width: {$btnw}; text-decoration: none;' class='button' name='sitemap' value=' Site Map ' onclick='sendWindow(\"sitemap\",600,400,\"site_map.php?{$sid}&site={$site}\")' />"; print "\n\t</td>"; print "\n\t<td valign='top' align='left'>"; if ($_SESSION[auser] == $site_owner) { print "\n\t<input type='button' style='width: {$btnw}; text-decoration: none;' class='button' name='preview_as' value=' Preview Site As... ' onclick='sendWindow(\"preview_as\",400,300,\"preview.php?{$sid}&site={$site}&query=" . urlencode($_SERVER[QUERY_STRING]) . "\")' />"; } print "\n\t</td>"; print "\n\t</tr>\n</table>\n</div>"; print "\n\n<br /><div align='right'><a href='http://segue.sourceforge.net' target='_blank'><img border='0' src='themes/common/images/segue_logo_trans_solid.gif' alt='Segue Logo' /></a></div>"; $sitefooter = $sitefooter . ob_get_contents();
function helpHtml($id) { global $CONF; return helplink($id) . '<img src="' . $CONF['AdminURL'] . 'documentation/icon-help.gif" width="15" height="15" alt="' . _HELP_TT . '" title="' . _HELP_TT . '" /></a>'; }