/** show error-message and terminate */ function show_error($error, $extra = NULL) { _error($error . " : " . $extra); // we do not know whether the language module was already loaded $errmsg = isset($GLOBALS["error_msg"]) ? $GLOBALS["error_msg"]["error"] : "ERROR"; $backmsg = isset($GLOBALS["error_msg"]) ? $GLOBALS["error_msg"]["back"] : "BACK"; show_header($errmsg); ?> <center> <h2><?php echo $errmsg; ?> </h2> <?php echo $error; ?> <h3> <a href="javascript:window.history.back()"><?php echo $backmsg; ?> </a><h3> <?php if ($extra != NULL) { echo " - " . $extra; } ?> </center> <?php show_footer(); exit; }
function login() { if (isset($_SESSION["s_user"])) { _debug("login(): session detected"); //if ( ! user_activate( $_SESSION["s_user"], $_SESSION["s_pass"] )) if (!user_activate($_SESSION["s_user"], base64_decode($_SESSION["s_pass"]))) { _debug("Failed to activate user " . $_SESSION['s_user']); logout(); } } else { if (isset($_POST["p_pass"])) { $p_pass = $_POST["p_pass"]; } else { $p_pass = ""; } if (isset($_POST["p_user"])) { _debug("login(): login authentication"); // Check Login //if ( ! user_activate( stripslashes( $_POST["p_user"] ), md5( stripslashes( $p_pass ) ) ) ) if (!user_activate(stripslashes($_POST["p_user"]), $p_pass)) { global $error_msg; show_error($error_msg["login_failed"] . ": " . $_POST["p_user"]); } // authentication sucessfull _debug("user '" . $_POST["p_user"] . "' successfully authenticated"); // set language $_SESSION['language'] = qx_request("lang", "en"); return; } else { // Ask for Login show_header($GLOBALS["messages"]["actlogin"]); echo "<CENTER><BR><TABLE width=\"300\"><TR><TD colspan=\"2\" class=\"header\" nowrap><B>"; echo $GLOBALS["messages"]["actloginheader"] . "</B></TD></TR>\n<FORM name=\"login\" action=\""; echo make_link("login", NULL, NULL) . "\" method=\"post\">\n"; echo "<TR><TD>" . $GLOBALS["messages"]["miscusername"] . ":</TD><TD align=\"right\">"; echo "<INPUT name=\"p_user\" type=\"text\" size=\"25\"></TD></TR>\n"; echo "<TR><TD>" . $GLOBALS["messages"]["miscpassword"] . ":</TD><TD align=\"right\">"; echo "<INPUT name=\"p_pass\" type=\"password\" size=\"25\"></TD></TR>\n"; // NAS4Free Code //Select box and auto language detection array echo "<TR><TD>" . gettext("Detected Language:<br />(Change if needed)") . "</TD><TD align=\"right\">"; @(include "./_lang/_info.php"); // End NAS4Free Code echo "<TR><TD colspan=\"2\" align=\"right\"><INPUT type=\"submit\" value=\""; echo $GLOBALS["messages"]["btnlogin"] . "\"></TD></TR>\n</FORM></TABLE><BR></CENTER>\n"; ?> <script language="JavaScript1.2" type="text/javascript"> <!-- if(document.login) document.login.p_user.focus(); // --> </script><?php show_footer(); exit; } } }
function login() { //print_r($GLOBALS['__SESSION']); if (isset($GLOBALS['__SESSION']["s_user"])) { if (!activate_user($GLOBALS['__SESSION']["s_user"], $GLOBALS['__SESSION']["s_pass"])) { logout(); } $GLOBALS["lang"] = $GLOBALS['__SESSION']["s_lang"]; $GLOBALS["language"] = $GLOBALS['__SESSION']["s_lang"]; require "./_lang/" . $GLOBALS["language"] . ".php"; require "./_lang/" . $GLOBALS["language"] . "_mimes.php"; } else { if (isset($GLOBALS['__POST']["p_pass"])) { $p_pass = $GLOBALS['__POST']["p_pass"]; } else { $p_pass = ""; } if (isset($GLOBALS['__POST']["p_user"])) { // Check Login if (!activate_user(stripslashes($GLOBALS['__POST']["p_user"]), md5(stripslashes($p_pass)))) { logout(); } $GLOBALS['__SESSION']["s_lang"] = $GLOBALS['__POST']["lang"]; return; } else { // Ask for Login show_header($GLOBALS["messages"]["actlogin"]); echo "<BR><TABLE width=\"300\"><TR><TD colspan=\"2\" class=\"header\" nowrap><B>"; echo $GLOBALS["messages"]["actloginheader"] . "</B></TD></TR>\n<FORM name=\"login\" action=\""; echo make_link("login", NULL, NULL) . "\" method=\"post\">\n"; echo "<TR><TD>" . $GLOBALS["messages"]["miscusername"] . ":</TD><TD align=\"right\">"; echo "<INPUT name=\"p_user\" type=\"text\" size=\"25\"></TD></TR>\n"; echo "<TR><TD>" . $GLOBALS["messages"]["miscpassword"] . ":</TD><TD align=\"right\">"; echo "<INPUT name=\"p_pass\" type=\"password\" size=\"25\"></TD></TR>\n"; echo "<TR><TD>" . $GLOBALS["messages"]["misclang"] . ":</TD><TD align=\"right\">"; echo "<SELECT name=\"lang\">\n"; @(include "./_lang/_info.php"); echo "</SELECT></TD></TR>\n"; echo "<TR><TD colspan=\"2\" align=\"right\"><INPUT type=\"submit\" value=\""; echo $GLOBALS["messages"]["btnlogin"] . "\"></TD></TR>\n</FORM></TABLE><BR>\n"; ?> <script language="JavaScript1.2" type="text/javascript"> <!-- if(document.login) document.login.p_user.focus(); // --> </script><?php show_footer(); exit; } } }
function show_error($error, $extra = NULL) { // show error-message show_header($GLOBALS["error_msg"]["error"]); echo "<CENTER><BR>" . $GLOBALS["error_msg"]["error"] . ":" . "<BR><BR>\n"; echo $error . "\n<BR><BR><A HREF=\"javascript:window.history.back()\">"; echo $GLOBALS["error_msg"]["back"] . "</A>"; if ($extra != NULL) { echo " - " . $extra; } echo "<BR><BR></CENTER>\n"; show_footer(); exit; }
function show_msg($message, $url_forward = '') { if ($url_forward) { $message = "<a href=\"{$url_forward}\">{$message} (跳轉中...)</a><script>setTimeout(\"window.location.href ='{$url_forward}';\", 1);</script>"; } show_header(); print <<<END \t<table> \t<tr><td>{$message}</td></tr> \t</table> END; show_footer(); exit; }
function rename_item($dir, $item) { // rename directory or file $mainframe =& JFactory::getApplication(); if (($GLOBALS["permissions"] & 01) != 01) { show_error($GLOBALS["error_msg"]["accessfunc"]); } if (isset($GLOBALS['__POST']["confirm"]) && $GLOBALS['__POST']["confirm"] == "true") { $newitemname = $GLOBALS['__POST']["newitemname"]; $newitemname = trim(basename(stripslashes($newitemname))); if ($newitemname == '') { show_error($GLOBALS["error_msg"]["miscnoname"]); } if (!nx_isFTPMode()) { $abs_old = get_abs_item($dir, $item); $abs_new = get_abs_item($dir, $newitemname); } else { $abs_old = get_item_info($dir, $item); $abs_new = get_item_info($dir, $newitemname); } if (@$GLOBALS['nx_File']->file_exists($abs_new)) { show_error($newitemname . ": " . $GLOBALS["error_msg"]["itemdoesexist"]); } $perms_old = $GLOBALS['nx_File']->fileperms($abs_old); $ok = $GLOBALS['nx_File']->rename(get_abs_item($dir, $item), get_abs_item($dir, $newitemname)); if (nx_isFTPMode()) { $abs_new = get_item_info($dir, $newitemname); } $GLOBALS['nx_File']->chmod($abs_new, $perms_old); if ($ok === false || PEAR::isError($ok)) { show_error('Could not rename ' . $item . ' to ' . $newitemname); } $msg = sprintf($GLOBALS['messages']['success_rename_file'], $item, $newitemname); $mainframe->redirect(make_link("list", $dir, null), $msg); } show_header($GLOBALS['messages']['rename_file']); // Form echo '<br /><form method="post" action="'; echo make_link("rename", $dir, $item) . "\">\n"; echo "<input type=\"hidden\" name=\"confirm\" value=\"true\" />\n"; echo "<input type=\"hidden\" name=\"item\" value=\"" . stripslashes($GLOBALS['__GET']["item"]) . "\" />\n"; // Submit / Cancel echo "<table>\n<tr><tr><td colspan=\"2\">\n"; echo "<label for=\"newitemname\">" . $GLOBALS["messages"]["newname"] . ":</label> <input name=\"newitemname\" id=\"newitemname\" type=\"text\" size=\"60\" value=\"" . stripslashes($_GET['item']) . "\" /><br /><br /><br /></td></tr>\n"; echo "<tr><tr><td>\n<input type=\"submit\" value=\"" . $GLOBALS["messages"]["btnchange"]; echo "\"></td>\n<td><input type=\"button\" value=\"" . $GLOBALS["messages"]["btncancel"]; echo "\" onclick=\"javascript:location='" . make_link("list", $dir, NULL) . "';\">\n</td></tr></form></table><br />\n"; }
function login() { global $my; if (isset($GLOBALS['__SESSION']["s_user"])) { if (!activate_user($GLOBALS['__SESSION']["s_user"], $GLOBALS['__SESSION']["s_pass"])) { logout(); } } else { if (isset($GLOBALS['__POST']["p_pass"])) { $p_pass = $GLOBALS['__POST']["p_pass"]; } else { $p_pass = ""; } if (isset($GLOBALS['__POST']["p_user"])) { // Check Login if (!activate_user(stripslashes($GLOBALS['__POST']["p_user"]), md5(stripslashes($p_pass)))) { logout(); } return; } else { // Ask for Login show_header($GLOBALS["messages"]["actlogin"]); echo "<br><table width=\"300\"><tr><td colspan=\"2\" class=\"header\" nowrap><b>"; echo $GLOBALS["messages"]["actloginheader"] . "</b></td></tr>\n<form name=\"login\" action=\""; echo make_link("login", null, null) . "\" method=\"post\">\n"; echo "<tr><td>" . $GLOBALS["messages"]["miscusername"] . ":</td><td align=\"right\">"; echo "<input name=\"p_user\" type=\"text\" value=\"" . $my->username . "\" size=\"25\"></td></tr>\n"; echo "<tr><td>" . $GLOBALS["messages"]["miscpassword"] . ":</td><td align=\"right\">"; echo "<input name=\"p_pass\" type=\"password\" size=\"25\"></td></tr>\n"; echo "<tr><td>" . $GLOBALS["messages"]["misclang"] . ":</td><td align=\"right\">"; echo "<select name=\"lang\">\n"; @(include _QUIXPLORER_PATH . "/languages/_info.php"); echo "</select></td></tr>\n"; echo "<tr><td colspan=\"2\" align=\"right\"><input type=\"submit\" value=\""; echo $GLOBALS["messages"]["btnlogin"] . "\"></td></tr>\n</form></table><br>\n"; ?> <script language="JavaScript1.2" type="text/javascript"> <!-- if(document.login) document.login.p_user.focus(); // --> </script><?php show_footer(); exit; } } }
function upload_items($dir) { _debug("fun_up_ajaxupload.upload_items({$dir})"); if (!permissions_grant($dir, NULL, "create")) { show_error($GLOBALS["error_msg"]["accessfunc"]); } if (isset($GLOBALS['__POST']["confirm"]) && $GLOBALS['__POST']["confirm"] == "true") { _debug("linking to list({$dir})"); header("Location: " . make_link("list", $dir, NULL)); return; } global $no_access; $additional_header_information = file_get_contents("_lib/ajaxupload/upload.html"); $additional_header_information = preg_replace("/@destination_folder@/", $dir, $additional_header_information); $additional_header_information = preg_replace("/@filter_pattern@/", "/{$no_access}/", $additional_header_information); show_header($GLOBALS["messages"]["actupload"], $additional_header_information); ?> <br> <div id="example1" class="example"> <div class="wrapper"> <div id="button1" class="button">Upload</div> </div> <ol class="status"></ol> <p>Uploaded files:</p> <ol class="files"></ol> </div> <table> <tr> <td> <input type="button" onClick="window.location = '<?php echo make_link("list", $dir, NULL); ?> ';" value="<?php echo $GLOBALS["error_msg"]["back"]; ?> "> </td> </tr> </table> </form> <br> <?php return; }
function show_msg($message, $url_forward = '') { global $_iGLOBAL; obclean(); if ($url_forward) { $_iGLOBAL['extrahead'] = '<meta http-equiv="refresh" content="100; url=' . $url_forward . '">'; $message = "<a href=\"{$url_forward}\">{$message}(跳转中...)</a>"; } else { $_iGLOBAL['extrahead'] = ''; } show_header(); print <<<END \t<table> \t<tr><td>{$message}</td></tr> \t</table> END; show_footer(); exit; }
function show_msg($message, $url_forward = '') { global $_SGLOBAL; obclean(); $_SGLOBAL['extrahead'] = $url_forward ? '<meta http-equiv="refresh" content="0; url=' . $url_forward . '">' : ''; show_header(); print <<<END \t<table> \t<tr><td>{$message}</td></tr> \t</table> END; show_footer(); exit; }
function edit_file($dir, $item) { // edit file if (($GLOBALS["permissions"] & 01) != 01) { show_error($GLOBALS["error_msg"]["accessfunc"]); } if (!get_is_file($dir, $item)) { show_error($item . ": " . $GLOBALS["error_msg"]["fileexist"]); } if (!get_show_item($dir, $item)) { show_error($item . ": " . $GLOBALS["error_msg"]["accessfile"]); } $fname = get_abs_item($dir, $item); if (isset($GLOBALS['__POST']["dosave"]) && $GLOBALS['__POST']["dosave"] == "yes") { // Save / Save As $item = base_name(stripslashes($GLOBALS['__POST']["fname"])); $fname2 = get_abs_item($dir, $item); if (!isset($item) || $item == "") { show_error($GLOBALS["error_msg"]["miscnoname"]); } if ($fname != $fname2 && @file_exists($fname2)) { show_error($item . ": " . $GLOBALS["error_msg"]["itemdoesexist"]); } savefile($fname2); $fname = $fname2; } // open file $fp = @fopen($fname, "r"); if ($fp === false) { show_error($item . ": " . $GLOBALS["error_msg"]["openfile"]); } // header $s_item = get_rel_item($dir, $item); if (strlen($s_item) > 50) { $s_item = "..." . substr($s_item, -47); } show_header($GLOBALS["messages"]["actedit"] . ": /" . $s_item); // Wordwrap (works only in IE) ?> <script language="JavaScript1.2" type="text/javascript"> <!-- function chwrap() { if(document.editfrm.wrap.checked) { document.editfrm.code.wrap="soft"; } else { document.editfrm.code.wrap="off"; } } // --> </script><?php // Form echo "<BR><FORM name=\"editfrm\" method=\"post\" action=\"" . make_link("edit", $dir, $item) . "\">\n"; echo "<input type=\"hidden\" name=\"dosave\" value=\"yes\">\n"; echo "<TEXTAREA NAME=\"code\" rows=\"25\" cols=\"120\" wrap=\"off\">"; // Show File In TextArea $buffer = ""; while (!feof($fp)) { $buffer .= fgets($fp, 4096); } @fclose($fp); echo htmlspecialchars($buffer); echo "</TEXTAREA><BR>\n<TABLE><TR><TD>Wordwrap: (IE only)</TD><TD><INPUT type=\"checkbox\" name=\"wrap\" "; echo "onClick=\"javascript:chwrap();\" value=\"1\"></TD></TR></TABLE><BR>\n"; echo "<TABLE><TR><TD><INPUT type=\"text\" name=\"fname\" value=\"" . $item . "\"></TD>"; echo "<TD><input type=\"submit\" value=\"" . $GLOBALS["messages"]["btnsave"]; echo "\"></TD>\n<TD><input type=\"reset\" value=\"" . $GLOBALS["messages"]["btnreset"] . "\"></TD>\n<TD>"; echo "<input type=\"button\" value=\"" . $GLOBALS["messages"]["btnclose"] . "\" onClick=\"javascript:location='"; echo make_link("list", $dir, NULL) . "';\"></TD></TR></FORM></TABLE><BR>\n"; ?> <script language="JavaScript1.2" type="text/javascript"> <!-- if(document.editfrm) document.editfrm.code.focus(); // --> </script><?php }
<?php session_start(); require_once '../config.php'; require_once '../database.php'; require_once '../ui.php'; show_header('../'); show_menu('../'); #Authentication: if (!isset($_SESSION['admin'])) { if (!isset($_POST['pwd'])) { include 'login.php'; } else { $user = list_users('admin'); print_r($user); print_r($_POST); if ($user['upassword'] == $_POST['pwd']) { $_SESSION['admin'] = 'yes'; print 'Access granted.'; } else { print 'Wrong password!'; } } } if (isset($_SESSION['admin'])) { $devices = list_secrets(); $settings = list_settings(); show_settings($settings); show_devices($devices); } include '../html_footer.html';
function login_page() { show_header(); $formhash = thash(); print <<<END \t\t<span>工具箱登录</span> \t\t<form action="tools.php?action=login" method="post"> \t\t\t<table class="specialtable"> \t\t\t<tr> \t\t\t\t<td width="20%"><input class="textinput" type="password" name="toolpassword"></input></td> \t\t\t\t<td><input class="specialsubmit" type="submit" value="登 录"></input></td> \t\t\t</tr> \t\t\t</table> \t\t\t<input type="hidden" name="action" value="login"> \t\t\t<input type="hidden" name="formhash" value="{$formhash}"> \t\t</form> END; show_footer(); }
$DB->query("SELECT Name, Description, UserID, Deleted FROM collages WHERE ID='$CollageID'"); if($DB->record_count() > 0) { list($Name, $Description, $UserID, $Deleted) = $DB->next_record(); $TorrentList=''; $CollageList=''; } else { $Deleted = '1'; } } if($Deleted == '1') { header('Location: log.php?search=Collage+'.$CollageID); die(); } show_header($Name,'browse,collage'); show_message(); // Build the data for the collage and the torrent list if(!is_array($TorrentList)) { $DB->query("SELECT ct.GroupID, tg.WikiImage, tg.CategoryID, um.ID, um.Username FROM collages_torrents AS ct JOIN torrents_group AS tg ON tg.ID=ct.GroupID LEFT JOIN users_main AS um ON um.ID=ct.UserID WHERE ct.CollageID='$CollageID' ORDER BY ct.Sort");
if (isset($_GET['ip']) && isset($_GET['port'])) { $Octets = explode(".", $_GET['ip']); if (empty($_GET['ip']) || !preg_match('/\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}/', $_GET['ip']) || $Octets[0] < 0 || $Octets[0] > 255 || $Octets[1] < 0 || $Octets[1] > 255 || $Octets[2] < 0 || $Octets[2] > 255 || $Octets[3] < 0 || $Octets[3] > 255 || $Octets[0] == 127 || $Octets[0] == 192) { die('Invalid IP'); } if (empty($_GET['port']) || !is_number($_GET['port']) || $_GET['port'] < 1 || $_GET['port'] > 65535) { die('Invalid Port'); } //Error suppression, ugh. if (@fsockopen($_GET['ip'], $_GET['port'], $Errno, $Errstr, 20)) { die('Port ' . $_GET['port'] . ' on ' . $_GET['ip'] . ' connected successfully.'); } else { die('Port ' . $_GET['port'] . ' on ' . $_GET['ip'] . ' failed to connect.'); } } show_header('Connectability Checker'); ?> <div class="thin"> <h2><a href="user.php?id=<?php echo $LoggedUser['ID']; ?> "><?php echo $LoggedUser['Username']; ?> </a> > Connectability Checker</h2> <form action="javascript:check_ip();" method="get"> <table> <tr> <td class="label">IP</td> <td> <input type="text" id="ip" name="ip" value="<?php
define('USERS_PER_PAGE', 30); if (isset($_GET['username'])) { $_GET['username'] = trim($_GET['username']); // form submitted $Val->SetFields('username', '1', 'username', 'Please enter a username.'); $Err = $Val->ValidateForm($_GET); if (!$Err) { // Passed validation. Let's rock. list($Page, $Limit) = page_limit(USERS_PER_PAGE); $DB->query("SELECT SQL_CALC_FOUND_ROWS\n\t\t\tID,\n\t\t\tUsername,\n\t\t\tEnabled,\n\t\t\tPermissionID,\n\t\t\tDonor,\n\t\t\tWarned\n\t\t\tFROM users_main AS um\n\t\t\tJOIN users_info AS ui ON ui.UserID=um.ID\n\t\t\tWHERE Username LIKE '%" . db_string($_GET['username']) . "%'\n\t\t\tORDER BY Username\n\t\t\tLIMIT {$Limit}"); $Results = $DB->to_array(); $DB->query('SELECT FOUND_ROWS();'); list($NumResults) = $DB->next_record(); } } show_header('User search'); ?> <div class="thin"> <h3>Search results</h3> <div class="linkbox"> <?php $Pages = get_pages($Page, $NumResults, USERS_PER_PAGE, 9); echo $Pages; ?> </div> <form action="user.php" method="get"> <input type="hidden" name="action" value="search" /> <table width="100%"> <tr> <td class="label nobr">Username:</td> <td>
$Delta = unserialize($Customs); } $Permissions = array_merge($Defaults,$Delta); function display_perm($Key,$Title) { global $Defaults, $Permissions; $Perm='<input id="default_'.$Key.'" type="checkbox" disabled'; if (isset($Defaults[$Key]) && $Defaults[$Key]) { $Perm.=' checked'; } $Perm.=' /><input type="checkbox" name="perm_'.$Key.'" id="'.$Key.'" value="1"'; if (isset($Permissions[$Key]) && $Permissions[$Key]) { $Perm.=' checked'; } $Perm.=' /> <label for="'.$Key.'">'.$Title.'</label><br />'; echo $Perm; } show_header($Username.' > Permissions'); ?> <script type="text/javascript"> function reset() { for (i = 0; i < $('#permform').raw().elements.length; i++) { element = $('#permform').raw().elements[i]; if (element.id.substr(0,8) == 'default_') { $('#' + element.id.substr(8)).raw().checked = element.checked; } } } </script> <h2><?php echo format_username($UserID, $Username); ?> > Permissions</h2>
<? if(!check_perms('users_view_ips')) { error(403); } show_header('Dupe IPs'); define('USERS_PER_PAGE', 50); define('IP_OVERLAPS', 5); list($Page,$Limit) = page_limit(USERS_PER_PAGE); $RS = $DB->query("SELECT SQL_CALC_FOUND_ROWS m.ID, m.IP, m.Username, m.PermissionID, m.Enabled, i.Donor, i.Warned, i.JoinDate, (SELECT COUNT(DISTINCT h.UserID) FROM users_history_ips AS h WHERE h.IP=m.IP) AS Uses FROM users_main AS m LEFT JOIN users_info AS i ON i.UserID=m.ID WHERE (SELECT COUNT(DISTINCT h.UserID) FROM users_history_ips AS h WHERE h.IP=m.IP) >= ".IP_OVERLAPS." AND m.Enabled = '1' AND m.IP != '127.0.0.1' ORDER BY Uses DESC LIMIT $Limit"); $DB->query("SELECT FOUND_ROWS()"); list($Results) = $DB->next_record(); $DB->set_query_id($RS); if($DB->record_count()) { ?>
function show_msg($message, $next = 0, $jump = 0) { global $theurl; $nextstr = ''; $backstr = ''; obclean(); if (empty($next)) { $backstr = "<a href=\"javascript:history.go(-1);\">返回上一步</a>"; } elseif ($next == 999) { } else { $url_forward = "{$theurl}?step={$next}"; $nextstr = "<a href=\"{$url_forward}\">继续下一步</a>"; if ($jump) { $nextstr .= "<script>setTimeout(\"window.location.href ='{$url_forward}';\", 1000);</script>"; } $backstr = "<a href=\"javascript:history.go(-1);\">返回上一步</a>"; } show_header(); print <<<END \t<table> \t<tr><td>{$message}</td></tr> \t<tr><td> </td></tr> \t<tr><td>{$backstr} {$nextstr}</td></tr> \t</table> END; show_footer(); exit; }
} $DB->query("SELECT ID FROM torrents_group WHERE ID='$NewGroupID'"); if($DB->record_count()==0) { error('Target group does not exist.'); } //Everything is legit, let's just confim they're not retarded if(empty($_POST['confirm'])) { $DB->query("SELECT Name FROM torrents_group WHERE ID = ".$GroupID); list($Name) = $DB->next_record(); $DB->query("SELECT Name FROM torrents_group WHERE ID = ".$NewGroupID); list($NewName) = $DB->next_record(); $Artists = get_artists(array($GroupID, $NewGroupID)); show_header(); ?> <div class="center thin"> <h2>Merge Confirm!</h2> <div class="box pad"> <form action="torrents.php" method="post"> <input type="hidden" name="action" value="merge" /> <input type="hidden" name="confirm" value="true" /> <input type="hidden" name="groupid" value="<?php echo $GroupID; ?> " /> <input type="hidden" name="targetgroupid" value="<?php echo $NewGroupID; ?> " />
// OUT OF OR IN CONNECTION WITH THE WORK OR THE USE OR OTHER DEALINGS // IN THE WORK. //---------------------------------------------------------------------- require_once "user.php"; require_once "header.php"; require_once "sr_client.php"; require_once "sr_constants.php"; require_once "pa_client.php"; require_once "pa_constants.php"; require_once "pa_client.php"; $user = geni_loadUser(); if (!isset($user) || is_null($user) || !$user->isActive()) { relative_redirect('home.php'); } include "tool-lookupids.php"; show_header('GENI Portal: Projects'); include "tool-breadcrumbs.php"; if (!isset($project)) { $project = "new"; $isnew = true; print "<h1>NEW GENI Project</h1>\n"; } else { $isnew = false; $leadid = $project[PA_PROJECT_TABLE_FIELDNAME::LEAD_ID]; if (!uuid_is_valid($leadid)) { error_log("edit-project: invalid leadid from DB for project {$project_id}"); exit; } $lead = $user->fetchMember($leadid); $leadname = $lead->prettyName(); $leademail = $lead->email();
<? $CollageID = $_GET['collageid']; if(!is_number($CollageID) || !$CollageID) { error(404); } $DB->query("SELECT Name, UserID FROM collages WHERE ID='$CollageID'"); list($Name, $UserID) = $DB->next_record(); if(!check_perms('site_collages_delete') && $UserID != $LoggedUser['ID']) { error(403); } show_header('Delete collage'); ?> <div class="thin center"> <div class="box" style="width:600px; margin:0px auto;"> <div class="head colhead"> Delete collage </div> <div class="pad"> <form action="collages.php" method="post"> <input type="hidden" name="action" value="take_delete" /> <input type="hidden" name="collageid" value="<?php echo $CollageID; ?> " /> <strong>Reason: </strong> <input type="text" name="reason" size="30" /> <input value="Delete" type="submit" />
} if (isset($slice_expired) && convert_boolean($slice_expired)) { if (!isset($slice_name)) { $slice_name = ""; } $_SESSION['lasterror'] = "Slice " . $slice_name . " is expired."; relative_redirect('dashboard.php#slices'); } if (!$user->isAllowed(SA_ACTION::GET_SLICE_CREDENTIAL, CS_CONTEXT_TYPE::SLICE, $slice_id)) { relative_redirect('home.php'); } // TODO: Pass expiration to slicecred.py $outside_key = db_fetch_outside_private_key_cert($user->account_id); if (!$outside_key) { include "header.php"; show_header('GENI Portal: Slices'); include "tool-breadcrumbs.php"; print "<h2>Cannot Download Slice Credential</h2>\n"; print "This page allows you to download a slice credential file," . " for use in other tools (e.g. Omni).\n" . "This is advanced functionality, not required for typical GENI users.\n" . "Please" . " <button onClick=\"window.location='" . relative_url("downloadkeycert.php") . "'\">Download your key and certificate</button>" . " so that a credential can be retrieved."; include "footer.php"; exit; } // Get the slice credential from the SA using the outside certificate $slice_credential = get_slice_credential($sa_url, $user, $slice_id, $outside_key['certificate']); // FIXME: slice name only unique within project. Need slice URN? /* FIXME COMMENT: The URN would suck as part of a filename. Too many * special characters. */ $cred_filename = $slice_name . "-cred.xml"; // Set headers for download header("Cache-Control: public");
5. Raw numbers a. total torrents, seeders, leechers b. average seeds/leechs per torrent c. average snatches/user d. average seeding torrents/user e. users on ratio watch 6. Distribution graph of seedership vs. torrent percentage a. graph showing that the top 1% of torrents has 50% of seeders or whatever the numbers might be 7. Effects of economic changes a. number of users changed by ratio being changed b. project effects with intelligent mathematical analysis of a 24, 48 or 72 hour freeleech */ if (!check_perms('site_view_flow')) { error(403); } show_header('Economy'); if (!($EconomicStats = $Cache->get_value('new_economic_stats'))) { $DB->query("SELECT SUM(Uploaded), SUM(Downloaded), COUNT(ID) FROM users_main WHERE Enabled='1'"); list($TotalUpload, $TotalDownload, $NumUsers) = $DB->next_record(); $DB->query("SELECT SUM(Bounty) FROM requests_votes"); list($TotalBounty) = $DB->next_record(); $DB->query("SELECT SUM(rv.Bounty) FROM requests_votes AS rv JOIN requests AS r ON r.ID=rv.RequestID WHERE TorrentID>0"); list($AvailableBounty) = $DB->next_record(); $DB->query("SELECT SUM(Snatched), COUNT(ID) FROM torrents"); list($TotalSnatches, $TotalTorrents) = $DB->next_record(); // This is the total number of snatches for torrents that still exist $DB->query("SELECT COUNT(uid) FROM xbt_snatched"); list($TotalOverallSnatches) = $DB->next_record(); if (($PeerStats = $Cache->get_value('stats_peers')) === false) { $DB->query("SELECT COUNT(fid) FROM xbt_files_users WHERE remaining=0"); list($TotalSeeders) = $DB->next_record();
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, // WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE WORK OR THE USE OR OTHER DEALINGS // IN THE WORK. //---------------------------------------------------------------------- require_once "header.php"; require_once "settings.php"; require_once "user.php"; require_once "jacks-app.php"; $user = geni_loadUser(); if (!isset($user) || is_null($user) || !$user->isActive()) { relative_redirect('home.php'); } show_header('GENI Portal: View Resources', true, true); setup_jacks_slice_context(); ?> <link rel="stylesheet" type="text/css" href="slice-jacks.css" /> <link rel="stylesheet" type="text/css" href="jacks-app.css" /> <link rel="stylesheet" type="text/css" href="jacks-editor-app.css" /> <link rel="stylesheet" type="text/css" href="slice-table.css" /> <script>var jacks_app_expanded = true;</script> <script src="jacks-lib.js"></script> <script src="jacks-app.js"></script> <script src="portal-jacks-app.js"></script> <script src="portal-jacks-editor-app.js"></script> <script src="<?php
function upload_items($dir) { if (!permissions_grant($dir, NULL, "create")) { show_error($GLOBALS["error_msg"]["accessfunc"]); } // Execute if (isset($GLOBALS['__POST']["confirm"]) && $GLOBALS['__POST']["confirm"] == "true") { $cnt = count($GLOBALS['__FILES']['userfile']['name']); $err = false; $err_avaliable = isset($GLOBALS['__FILES']['userfile']['error']); // upload files & check for errors for ($i = 0; $i < $cnt; $i++) { $errors[$i] = NULL; $tmp = $GLOBALS['__FILES']['userfile']['tmp_name'][$i]; $items[$i] = stripslashes($GLOBALS['__FILES']['userfile']['name'][$i]); if ($err_avaliable) { $up_err = $GLOBALS['__FILES']['userfile']['error'][$i]; } else { $up_err = file_exists($tmp) ? 0 : 4; } $abs = get_abs_item($dir, $items[$i]); if ($items[$i] == "" || $up_err == 4) { continue; } if ($up_err == 1 || $up_err == 2) { $errors[$i] = $GLOBALS["error_msg"]["miscfilesize"]; $err = true; continue; } if ($up_err == 3) { $errors[$i] = $GLOBALS["error_msg"]["miscfilepart"]; $err = true; continue; } if (!is_uploaded_file($tmp)) { $errors[$i] = $GLOBALS["error_msg"]["uploadfile"]; $err = true; continue; } if (file_exists($abs) && empty($_REQUEST['overwrite_files'])) { $errors[$i] = $GLOBALS["error_msg"]["itemdoesexist"]; $err = true; continue; } // Upload if (function_exists("move_uploaded_file")) { $ok = @move_uploaded_file($tmp, $abs); } else { $ok = @copy($tmp, $abs); @nlink($tmp); // try to delete... } if ($ok === false) { $errors[$i] = $GLOBALS["error_msg"]["uploadfile"]; $err = true; continue; } } if ($err) { // there were errors $err_msg = ""; for ($i = 0; $i < $cnt; $i++) { if ($errors[$i] == NULL) { continue; } $err_msg .= $items[$i] . " : " . $errors[$i] . "<BR>\n"; } show_error($err_msg); } miwoftp_redirect(make_link("list", $dir, NULL)); return; } show_header($GLOBALS["messages"]["actupload"]); // List echo "<br />"; echo "<form enctype=\"multipart/form-data\" action=\"" . make_link("upload", $dir, NULL) . "\" method=\"post\">"; echo "<input type=\"hidden\" name=\"MAX_FILE_SIZE\" value=\"\" method=\"post\">"; echo "<input type=\"hidden\" name=\"MAX_FILE_SIZE\" value=\"" . get_max_file_size() . "\">"; echo "<input type=\"hidden\" name=\"confirm\" value=\"true\">"; echo "<table>"; $filecount = 10; for ($ii = 0; $ii < $filecount; $ii++) { echo "<tr>"; echo "<td nowrap align=\"center\">"; echo "<input name=\"userfile[]\" type=\"file\" size=\"40\">"; echo "</td>"; echo "</tr>"; } echo "</table>"; echo "<br />"; echo "<table>"; echo "<tr>"; echo "<td colspan=\"2\">"; echo "<input type=\"checkbox\" checked=\"checked\" value=\"1\" name=\"overwrite_files\" id=\"overwrite_files\" /><label for=\"overwrite_files\">" . $GLOBALS["messages"]["overwrite_files"] . "</label>"; echo "<br />"; echo "<br />"; echo "</td>"; echo "</tr>"; echo "<tr>"; echo "<td>"; echo "<input type=\"submit\" value=\"" . $GLOBALS["messages"]["btnupload"] . "\">"; echo "</td>"; echo "<td>"; echo "<input type=\"button\" value=\"" . $GLOBALS["messages"]["btncancel"] . "\" onClick=\"javascript:location='" . make_link("list", $dir, NULL) . "';\">"; echo "</td>"; echo "</tr>"; echo "</table>"; echo "<input type=\"hidden\" name=\"option\" value=\"com_miwoftp\">"; echo "</form>"; echo "<br />"; return; }
$Users[$User2ID]['UserStr'] = format_username($User2ID, $User2Name, $User2Donor , $User2Warned, $User2Enabled == 2 ? false : true, $User2Class); $Users[$User2ID]['Username'] = $User2Name; $Users[0]['UserStr'] = 'System'; // in case it's a message from the system $Users[0]['Username'] = '******'; if($UnRead=='1') { $DB->query("UPDATE pm_conversations_users SET UnRead='0' WHERE ConvID='$ConvID' AND UserID='$UserID'"); // Clear the caches of the inbox and sentbox $Cache->decrement('inbox_new_'.$UserID); } show_header('View conversation '.$Subject, 'comments,inbox'); // Get messages $DB->query("SELECT SentDate, SenderID, Body, ID FROM pm_messages AS m WHERE ConvID='$ConvID' ORDER BY ID"); ?> <div class="thin"> <h2><?php echo $Subject; ?> </h2> <div class="linkbox"> <a href="inbox.php">[Back to inbox]</a> </div> <? while(list($SentDate, $SenderID, $Body, $MessageID) = $DB->next_record()) { ?> <div class="box vertical_space"> <div class="head">
<? /* * This is the outline page for auto reports, it calls the AJAX functions * that actually populate the page and shows the proper header and footer. * The important function is AddMore(). */ if(!check_perms('admin_reports')){ error(403); } show_header('Reports V2!', 'reportsv2'); include('header.php'); ?> <h2>New reports, auto assigned!</h2> <div class="buttonbox thin center"> <input type="button" onclick="AddMore();" value="Add More" /><input type="text" name="repop_amount" id="repop_amount" size="2" value="10" /> | <span title="Changes whether to automatically replace resolved ones with new ones"><input type="checkbox" checked="checked" id="dynamic"/> <label for="dynamic">Dynamic</label></span> | <span title="Resolves *all* checked reports with their respective resolutions"><input type="button" onclick="MultiResolve();" value="Multi-Resolve" /></span> | <span title="Un-In Progress all the reports currently displayed"><input type="button" onclick="GiveBack();" value="Give back all" /></span> </div> <br /> <div id="all_reports" class="center" style="width: 80%; margin-left: auto; margin-right: auto"> </div> <? show_footer(); ?>
$query = "INSERT INTO " . $dbapptable . " (bundleidentifier, name, symbolicate, issuetrackerurl, notifyemail, notifypush, hockeyappidentifier) values ('" . $bundleidentifier . "', '" . $name . "', " . $symbolicate . ", '" . $issuetrackerurl . "', '" . $emails . "', '" . $pushids . "', '" . $hockeyappidentifier . "')"; } else { if ($symbolicate != "" && $id != "") { $query = "UPDATE " . $dbapptable . " SET symbolicate = " . $symbolicate . " WHERE id = " . $id; } else { if ($id != "" && $symbolicate == "") { // delete a version $query = "DELETE FROM " . $dbapptable . " WHERE id = " . $id; } } } } if ($query != "") { $result = mysql_query($query) or die(end_with_result('Error in SQL ' . $query)); } show_header('- Apps'); echo '<h2><a href="app_name.php">Apps</a></h2>'; $cols = '<colgroup><col width="230"/><col width="200"/><col width="200"/><col width="150"/><col width="150"/></colgroup>'; echo '<table>' . $cols; echo "<tr><th>Bundle identifier / Name</th><th>Email - / Push Notifications</th><th>Issue Tracker / HockeyApp</th><th>Crashes</th><th>Actions</th></tr>"; echo '</table>'; if (!$acceptallapps) { echo "<form name='add_app' action='app_name.php' method='get'>"; echo '<table>' . $cols; echo "<tr align='center'><td><input type='text' name='bundleidentifier' size='25' maxlength='50' placeholder='com.yourcompany.appidentifier'/>"; echo "<input type='text' name='name' size='25' maxlength='250' placeholder='Application Name'/></td>"; echo "<td class='message'>"; if ($mail_activated) { echo "<input type='text' name='emails' size='25' maxlength='250' placeholder=', separated email addresses'/><br/>"; } else { echo "Email notifications not activated!<br/>";
function show_license() { global $self, $uchidden, $step; /*vot*/ global $language; $next = $step + 1; if (VIEW_OFF) { show_msg('license_contents', lang('license'), 1); } else { show_header(); $license = str_replace(' ', ' ', lang('license')); $lang_agreement_yes = lang('agreement_yes'); $lang_agreement_no = lang('agreement_no'); echo <<<EOT </div> <div class="main" style="margin-top:-123px;"> \t<div class="licenseblock">{$license}</div> \t<div class="btnbox marginbot"> \t\t<form method="get" autocomplete="off" action="index.php"> <!--vot-->\t<input type='hidden' name='language' value='{$language}' /> \t\t<input type="hidden" name="step" value="{$next}"> \t\t<input type="hidden" name="uchidden" value="{$uchidden}"> \t\t<input type="submit" name="submit" value="{$lang_agreement_yes}" style="padding: 2px"> \t\t<input type="button" name="exit" value="{$lang_agreement_no}" style="padding: 2px" onclick="javascript: window.close(); return false;"> \t\t</form> \t</div> EOT; show_footer(); } }