/**
  * Render a tpl file
  *
  * @author Atul Atri
  *
  * @param int    $_menuId          menu id
  * @param int    $_navId           navigation id
  * @param string $_documentTitle   document title
  * @param string $_customNavHtml   custom nav html
  * @param bool   $_includeTemplate include outer template
  * @param bool   $_scritpPath      script path to be included
  *
  * @return void
  */
 public function RenderTplFile($_menuId = 1, $_navId = 1, $_documentTitle = '', $_customNavHtml = '', $_includeTemplate = true, $_scritpPath = '')
 {
     if (!$_scritpPath) {
         $_appDirectory = $this->Router->GetApp()->GetDirectory();
         $_action = Clean($this->Router->GetAction());
         $_interfaceName = strtolower(Clean($this->Interface->GetName()));
         $_scritpPath = $_appDirectory . '/themes/' . $_interfaceName . '/templates/' . $_action . '.tpl';
     }
     if ($_includeTemplate) {
         $this->UserInterface->Header($_documentTitle, $_menuId, $_navId, $_customNavHtml);
     }
     $this->Template->Render('   ', SWIFT_TemplateEngine::TYPE_FILE, $_scritpPath);
     if ($_includeTemplate) {
         $this->UserInterface->Footer();
     }
 }
예제 #2
0
											bgcolor: "red"
										});
									});
								</script>
								<?php 
                            }
                        }
                    }
                }
            } catch (PDOEXception $error) {
                echo $error->getMessage();
            }
        }
    }
    $hash = Clean($_GET["hash"]);
    $id = Clean($_GET["id"]);
    $wallet = new Wallet($con, $coin);
    echo $wallet->confirm_email($hash, $id);
}
?>
<!DOCTYPE html>
<html >
<?php 
echo $header->get_index();
?>
	<header>
	<ul>
	<li><a href="index.php">Home</li></a>
	<li><a href="reg.php">Create Wallet</li></a>
	<li><a href="login.php">Wallet Login</li></a>
	</ul><br />
예제 #3
0
 function set_pj_acces($pj_acces)
 {
     $this->pj_acces = Clean($pj_acces);
 }
예제 #4
0
/**
 * 页面重定向
 *
 * @param string $url 地址
 */
function redirect($url)
{
    Clean();
    if (SYSTEM_ISCONSOLE) {
        msg('控制台模式下,请手动打开此地址:' . PHP_EOL . $url);
    }
    header("Location: " . $url);
    msg('<meta http-equiv="refresh" content="0; url=' . htmlspecialchars($url) . '" />请稍候......<br/><br/>如果您的浏览器没有自动跳转,请点击下面的链接', htmlspecialchars($url));
}
예제 #5
0
                         echo Change_Account_Email($con, $session, $email, $session);
                     }
                 }
             }
         } else {
             echo "Please Enter Account Password to change Setting!";
         }
     } else {
         echo "Please Enter Fields to change Account Setting!";
     }
 }
 if (!empty($_POST["Dump_address"])) {
     if ($_POST["Dump_address"] != "Choose Orb Address") {
         if (!empty($_POST["Dump_password"])) {
             $dump_adr = Clean(mysqli_real_escape_string($con, $_POST["Dump_address"]));
             $dump_pass = Clean(mysqli_real_escape_string($con, $_POST["Dump_password"]));
             echo Dump_address($con, $coin, $session, $dump_adr, $dump_pass);
         } else {
             echo "Please Enter Password To dump address!";
         }
     } else {
         echo "Please Select Orbitcoin For Dumpinging Address!";
     }
 }
 if (!empty($_POST["Balance"])) {
     echo Balance($con, $coin, $session);
 }
 if (!empty($_POST["total_receive"])) {
     echo total_receive($con, $coin, $session);
 }
 if (!empty($_POST["receive_txs"])) {
예제 #6
0
 if (!ctype_alnum($username)) {
     echo "Username Must be in alphabet and numbers";
 }
 $sqli_for_chk_user = mysqli_query($con, "SELECT Username FROM users WHERE Username='******'");
 if (mysqli_num_rows($sqli_for_chk_user) == 1) {
     echo "Username already taken!";
 } else {
     if (!empty($_POST["Password"])) {
         if (strlen($_POST["Password"]) >= 6) {
             $password = Clean(mysqli_real_escape_string($con, $_POST["Password"]));
             $password = sha1($password);
             if (!empty($_POST["Cpassword"])) {
                 $cpassword = Clean($_POST["Cpassword"]);
                 $cpassword = sha1($cpassword);
                 if ($password == $cpassword) {
                     $email = Clean(mysqli_real_escape_string($con, $_POST["Email"]));
                     if (!filter_var($email, FILTER_VALIDATE_EMAIL)) {
                         echo "Email is incorect!";
                     } else {
                         /// for captcha
                         //if (!class_exists('KeyCAPTCHA_CLASS')) {
                         //include('../php/keycaptcha.php');
                         //}
                         //$kc_o = new KeyCAPTCHA_CLASS();
                         //if ($kc_o->check_result($_POST['capcode'])) {
                         //} else {
                         //}
                         $address = $coin->getaccountaddress($username);
                         if ($address) {
                             $code = sha1(rand(0, 1000));
                             $id = mysqli_insert_id();
예제 #7
0
 function set_ct_rdr($ct_rdr)
 {
     $this->ct_rdr = Clean($ct_rdr);
 }
예제 #8
0
<?php

// Get selected package
$pkg = $DB->GetRow("SELECT * FROM zantastico WHERE id='" . Clean($_GET['id'], 1) . "'");
if (!isset($_GET['start'])) {
    /* ROOT MYSQL INFORMATION */
    // This must be correct, as this part of the script requires this much access
    $root_user = '';
    $root_pass = '';
    $webserver = '';
    // If DB is on a different machine, specify the hostname or IP
    // of your web server.
    // If you didn't set anything, lets use the default
    if ($root_user == '') {
        $root_user = $settings['zp_user'];
        $root_pass = $settings['zp_pass'];
    }
    if ($webserver == '') {
        $webserver = $settings['zp_host'];
    }
    // Get list of databases
    $ADMDB = NewADOConnection($settings['zp_dbtype'] . "://{$root_user}:{$root_pass}@{$webserver}/mysql");
    $databases = $ADMDB->GetAll("SELECT * FROM db WHERE User = '******'username'] . "'");
    $dbcount = $ADMDB->GetOne("SELECT COUNT(*) FROM db WHERE User = '******'username'] . "'");
    ?>
<h1>Installation Wizard</h1>
<p>You are now installing: <b><?php 
    echo $pkg['name'] . ' ' . $pkg['version'];
    ?>
</b></p>
예제 #9
0
     return $string;
 }
 require_once "config.php";
 if (isset($_POST["Username"]) && isset($_POST["Password"])) {
     if (!empty($_POST["Username"])) {
         $username = Clean(mysqli_real_escape_string($con, $_POST["Username"]));
         $chk_user = mysqli_query($con, "SELECT Username FROM users WHERE Username='******'");
         if (mysqli_num_rows($chk_user) != 1) {
             echo "Username Not Found!";
         } else {
             if (!empty($_POST["Password"])) {
                 $password = Clean(mysqli_real_escape_string($con, $_POST["Password"]));
                 $password = sha1($password);
                 $chk_login = mysqli_query($con, "SELECT Username,Password,Session_id FROM users WHERE Username='******' AND Password='******'");
                 if (mysqli_num_rows($chk_login) == 1) {
                     $yes = Clean('Yes');
                     $sql_chk_user_con = mysqli_query($con, "SELECT Username,Password,Session_id FROM users WHERE Username='******' AND Password='******' AND Email_confirm='" . $yes . "'");
                     if (mysqli_num_rows($sql_chk_user_con) == 1) {
                         session_start();
                         $convert = mysqli_fetch_array($chk_login);
                         $hash = substr(str_shuffle(str_repeat('abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!#$_=+:/,', 45)), 0, 45);
                         $Update_session_id = mysqli_query($con, "UPDATE users SET Session_id='" . $hash . "' WHERE Username='******' AND Password='******'");
                         if ($Update_session_id) {
                             $insert_session = $_SESSION["Usr_c"] = $hash;
                             session_save_path("/");
                             if ($_SERVER["SERVER_PORT"] == 443) {
                                 $chk_http = True;
                             } else {
                                 $chk_http = false;
                             }
                             session_set_cookie_params(0, "/", $_SERVER["SERVER_NAME"], $chk_http, TRUE);
예제 #10
0
파일: index.php 프로젝트: kelsh/classic
         if ($SQLError) {
             $Content['Body'] = "<b>Holy SHIT there was a MySQL error.</b>";
         } else {
             $Content['Body'] = "<b>Reverting...</b> <meta http-equiv='refresh' content='2;url=/{$Path}'>";
         }
     }
     break;
 case "register":
     $Head = '<meta name="robots" content="noindex, nofollow" />';
     $Content['UserNav']->Active("Register");
     $Content['Title'] = 'Friendship and happiness?<br />&nbsp;&nbsp;&nbsp;&nbsp;Register today!';
     if (!empty($_POST)) {
         $Name = Clean($_POST['Name']);
         $Email = Clean($_POST['Email']);
         $Password = Clean($_POST['Password']);
         $Confirm = Clean($_POST['Confirm']);
         if (empty($Name)) {
             $Form['_Errors']['Name'] = "Error: You must enter a name!";
         } elseif (strlen($Name) > 32) {
             $Form['_Errors']['Name'] = "Error: Your name is too long.";
         }
         if (empty($Email)) {
             $Form['_Errors']['Email'] = "Error: You must enter an email!";
         } elseif (strlen($Email) > 255) {
             $Form['_Errors']['Email'] = "Error: Your email is too long.";
         }
         if (empty($Password)) {
             $Form['_Errors']['Password'] = "******";
         } elseif (strlen($Password) > 32) {
             $Form['_Errors']['Password'] = "******";
         }
예제 #11
0
<?php

require_once "php/config.php";
function Clean($string)
{
    $string = mysql_real_escape_string($string);
    $string = htmlspecialchars($string);
    return $string;
}
if (isset($_GET["hash"]) && isset($_GET["id"])) {
    $code = Clean(mysqli_real_escape_string($con, $_GET["hash"]));
    $id = Clean(mysqli_real_escape_string($con, $_GET["id"]));
    $yes = Clean(mysqli_real_escape_string($con, "Yes"));
    $sqli_chk = mysqli_query($con, "SELECT ID FROM users WHERE Code='" . $code . "' AND ID='" . $id . "'");
    if (mysqli_num_rows($sqli_chk) == 1) {
        $sqli_up = mysqli_query($con, "UPDATE users SET Email_confirm='" . $yes . "' WHERE Code='" . $code . "' AND ID='" . $id . "'");
        $sqli_up = mysqli_query($con, "UPDATE users SET Code=Null WHERE Code='" . $code . "' AND ID='" . $id . "'");
        if ($sqli_up) {
            echo "<script>alert('ok!')</alert>";
        }
    } else {
        echo "<script>alert('ERROR')</alert>";
    }
}
session_start();
if (isset($_SESSION["Usr_c"])) {
    $session = $_SESSION["Usr_c"];
    $sqli_chk_session_true = mysqli_query($con, "SELECT Session_id FROM users WHERE Session_id='" . $session . "'");
    if (mysqli_num_rows($sqli_chk_session_true) == 1) {
        header("location:wallet.php");
    } else {
예제 #12
0
    echo $_GET['dom'];
    ?>
">Yes, delete</a> | <a href="?cat=<?php 
    echo $_GET['cat'];
    ?>
&page=<?php 
    echo $_GET['page'];
    ?>
">No, cancel</a></center>
</fieldset>
<?php 
    exit;
}
if (isset($_GET['delete'])) {
    // Remove maindomain and subdomains
    $DB->Execute("DELETE FROM domains WHERE user='******'username'] . "' AND domain='" . Clean($_GET['dom'], 1) . "' OR user='******'username'] . "' AND masterdomain='" . Clean($_GET['dom'], 1) . "'");
    // Restart Apache
    CreateVH();
    // Redirect to conf message
    echo '<script language="javascript">window.location = "?cat=' . $_GET['cat'] . '&page=' . $_GET['page'] . '&deleted"</script>';
}
// Get domains
$result = $DB->GetAll("SELECT * FROM domains WHERE parked=1 AND user='******'username'] . "' ORDER BY domain ASC");
function DomStatus($dom, $path)
{
    global $user;
    // Perform NS lookup
    $nslookup = strtolower(shell_exec("nslookup -timeout=1 {$dom}"));
    ini_set('default_socket_timeout', 1);
    $handle = @fopen("http://zwayradio.com/getip.php", "rb");
    $ip = @fread($handle, 8192);
예제 #13
0
파일: pc.class.php 프로젝트: japila/budget
 function set_pc_note($pc_note)
 {
     $this->pc_note = Clean($pc_note);
 }
예제 #14
0
<?php 
} else {
    ########
    ## Display a ticket
    ########
    if (isset($_POST['addition'])) {
        $id = Clean($_GET['ticket'], 1);
        $time = time();
        $description = addslashes($_POST['addition']);
        $customer = $user['username'];
        // Insert ticket's body
        $DB->Execute("INSERT INTO tickets_history (ticket,user,date,message) VALUES ('{$id}','{$customer}','{$time}','{$description}')");
    }
    // Get open tickets
    $ticket = $DB->GetRow("SELECT * FROM tickets WHERE id='" . Clean($_GET['ticket'], 1) . "'");
    ?>
<h1>Ticket #<?php 
    echo $ticket['id'];
    ?>
</h1>
<table class="ticketsys_newticket">
        <tr>
                <td class="fieldname" width="70px">Customer:</td>
                <td><?php 
    echo UserInfo($ticket['customer'], 'firstname') . ' ' . UserInfo($ticket['customer'], 'lastname');
    ?>
</td>
		<td class="fieldname" width="50px">Status:</td>
		<td><?php 
    echo Status($ticket['status']);
예제 #15
0
</div></div></div></div>
<?php 
}
?>

<p>Subdomains allow you to extend the functionality of your domains.</b>

<div id="domstatmsg"><img src="images/wait.gif" /> Loading subdomains...<br /><br /></div>

<?php 
flush();
ob_flush();
if (isset($_GET['edit'])) {
    $action = 'Edit';
    $button = 'Save';
    $thisdom = $DB->GetRow("SELECT * FROM domains WHERE user='******'username'] . "' AND domain='" . Clean($_GET['edit'], 1) . "'");
} else {
    $action = 'Add';
    $button = 'Add';
}
?>

<form action="javascript:<?php 
echo $action;
?>
Subdomain()" name="<?php 
echo strtolower($action);
?>
form">
<h1><?php 
echo $action;
예제 #16
0
     $unidxcont = CleanID($_POST["UnidadesPorContenedor"]);
     $unidadmedida = CleanText($_POST["UnidadMedida"]);
     $txtModelo = $txtMoDet[1];
     $txtDetalle = $txtMoDet[2];
     if (ClonarProducto($id, $idcolor, $idtalla, false, $codigobarras, $refprovhab, $coste, $precioventa, $ventamenudeo, $unidxcont, $unidadmedida, $idcontenedor, $referencia, $idalias0, $idalias1, $condventa)) {
         echo gas("aviso", _("Creado nuevo {$txtModelo}/{$txtDetalle}"));
         //Separador();
         //$_SESSION["IdUltimoCambioProductos"] = $id;
         PaginaBasica();
     }
     break;
 case "clonar":
     $id = CleanID($_GET["id"]);
     $idBase = CleanID($_GET["idBase"]);
     //$idBase = (isset($_SESSION["IdUltimoCambioProductos"]))? CleanID( $_SESSION["IdUltimoCambioProductos"] ):0;
     $volver = isset($_GET["volver"]) ? Clean($_GET["volver"]) : "";
     MostrarProductoParaClonado($id, $idBase, false, $volver);
     break;
 case "vaciarbasededatos":
     VaciarDatosProductosyAlmacen();
     echo gas("nota", "Tablas de productos y almacen vaciadas");
     break;
 case "preciochange":
     FormularioDeCambiodePrecio();
     break;
 case "transsel":
     //Busca estos productos en el almacen y los selecciona
     ConvertirSelProductos2Articulos();
     echo "<script>\nlocation.href='modalmacenes.php?modo=seleccion';\n</script>";
     break;
 case "operaseleccion":
예제 #17
0
파일: tag.php 프로젝트: kelsh/classic
function tag($path, $action, $title, $content)
{
    $action = implode('/', $action);
    $action = explode('/', $action, 3);
    $tag = Clean($action[1]);
    $cleanTag = ucwords(str_replace('-', ' ', $tag));
    if (isset($action[2])) {
        $path = $action[2];
    }
    $totalQuery = mysql_query("Select stats.`count`\n\t\t\t\t\t\t\t\tfrom `Wiki_Tag_Statistics` as stats\n\t\t\t\t\t\t\t\twhere stats.`tag` = '{$tag}'");
    $nextQuery = mysql_query("Select `Path`, `Title`\n\t\t\t\t\t\t\t\tfrom `Wiki_Pages`,\n\t\t\t\t\t\t\t\t\t`Wiki_Tags` as tag\n\t\t\t\t\t\t\t\twhere tag.`tag` = '{$tag}' and tag.`pageID` = `ID`\n\t\t\t\t\t\t\t\t\torder by tag.`tagID` desc limit 1");
    $previousQuery = mysql_query("Select `Path`, `Title`\n\t\t\t\t\t\t\t\tfrom `Wiki_Pages`,\n\t\t\t\t\t\t\t\t\t`Wiki_Tags` as tag\n\t\t\t\t\t\t\t\twhere tag.`tag` = '{$tag}' and tag.`pageID` = `ID`\n\t\t\t\t\t\t\t\t\torder by tag.`tagID` limit 1");
    list($tagTotal) = mysql_fetch_array($totalQuery);
    $next = mysql_fetch_array($nextQuery);
    $previous = mysql_fetch_array($previousQuery);
    if ($path or isset($action[2])) {
        $PageQuery = mysql_query("SELECT `ID`,`Title`,`Content`,`Edits`,`Views`,`EditTime`,tag.`tagID` FROM `Wiki_Pages`, `Wiki_Tags` as tag WHERE `Path` like '{$path}' and tag.`tag` = '{$tag}' and tag.`pageID` = `ID`");
        list($PageID, $PageTitle, $PageContent, $PageEdits, $pageViews, $PageEditTime, $tagID) = mysql_fetch_array($PageQuery);
        $previousQuery = mysql_query("Select `Path`, `Title`\n\t\t\t\t\t\t\t\t\t\tfrom `Wiki_Pages`,\n\t\t\t\t\t\t\t\t\t\t\t`Wiki_Tags` as tag\n\t\t\t\t\t\t\t\t\t\twhere tag.`tag` = '{$tag}' and tag.`pageID` = `ID` and tag.`tagID` >'{$tagID}'\n\t\t\t\t\t\t\t\t\t\t\torder by tag.`tagID` limit 1");
        $nextQuery = mysql_query("Select `Path`, `Title`\n\t\t\t\t\t\t\t\t\tfrom `Wiki_Pages`,\n\t\t\t\t\t\t\t\t\t\t`Wiki_Tags` as tag\n\t\t\t\t\t\t\t\t\twhere tag.`tag` = '{$tag}' and tag.`pageID` = `ID` and tag.`tagID` < '{$tagID}'\n\t\t\t\t\t\t\t\t\t\torder by tag.`tagID` desc limit 1");
        $pagePrevious = mysql_fetch_array($previousQuery);
        $pageNext = mysql_fetch_array($nextQuery);
        if ($pagePrevious) {
            $previous = $pagePrevious;
        }
        if ($pageNext) {
            $next = $pageNext;
        }
        $tagQuery = mysql_query("Select tags.`tag`, stats.`count`\n\t\t\t\t\t\t\t\t\tfrom `Wiki_Tags` as tags,\n\t\t\t\t\t\t\t\t\t\t `Wiki_Tag_Statistics` as stats\n\t\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\twhere tags.`pageID` = '{$PageID}'\n\t\t\t\t\t\t\t\t\t\tand stats.`tag` = tags.`tag`");
        while (list($tagName, $tagCount) = mysql_fetch_array($tagQuery)) {
            $plural = 's';
            if ($tagCount == 1) {
                $plural = '';
            }
            $tagLink = urlencode($tagName);
            $tagTitle = str_replace('-', ' ', $tagName);
            $tagLinks[] = "<a href='/?tag/{$tagLink}' title='{$tagCount} tagged page{$plural}'>{$tagTitle}</a>";
        }
        $tagLinks = implode(" | ", $tagLinks);
        if ($tagLinks) {
            $tagLinks = "<hr />Tags: {$tagLinks}";
        }
        $PageTitle = PageTitler($PageTitle);
        if (empty($PageContent)) {
            $PageContent = array("Hello friend. b{Wetfish regrets to inform you this page does not exist.}", "", "Confused? This is the {{wiki|Wetfish Wiki}}, a place anyone can edit!", "It appears you've stumbled upon a place none have yet traveled.", "Would you like to be the first? {{{$path}/?edit|All it takes is a click.}}", "", "i{But please, don't wallow.}", "i{A new page surely follows.}", "i{You have the power.}");
            $PageContent = implode("<br />", $PageContent);
        } else {
            mysql_query("Update `Wiki_Pages` set `Views` = `Views` + 1 where `ID`='{$PageID}'");
        }
        if ($_SESSION['admin']) {
            $content['ExtraNav'] = new Navigation();
            $content['ExtraNav']->Add("Archive This Page", FormatPath("/{$path}/") . "?archive");
            $content['ExtraNav']->Add("Rename This Page", FormatPath("/{$path}/") . "?rename");
        }
        if ($previous['Path']) {
            $previous['Path'] = "/{$previous['Path']}/?tag/{$tag}";
        } else {
            $previous['Path'] = "/?tag/{$tag}/";
        }
        if ($next['Path']) {
            $next['Path'] = "/{$next['Path']}/?tag/{$tag}";
        } else {
            $next['Path'] = "/?tag/{$tag}/";
        }
        $title[] = FishFormat($PageTitle, "strip");
        $content['Title'] .= "<a href='{$previous['Path']}' title='Previous - {$previous['Title']}'>⟨</a> " . FishFormat($PageTitle) . " <a href='{$next['Path']}' title='Next - {$next['Title']}'>⟩</a>";
        $content['Body'] .= FishFormat($PageContent);
        $content['Tags'] = $tagLinks;
    } else {
        mysql_query("Update `Wiki_Tag_Statistics` set `views` = `views` + 1\n\t\t\t\t\t\twhere `tag` = '{$tag}'");
        if ($previous['Path']) {
            $previous['Path'] = "/{$previous['Path']}/?tag/{$tag}";
        } else {
            $previous['Path'] = "/?tag/{$tag}/";
        }
        if ($next['Path']) {
            $next['Path'] = "/{$next['Path']}/?tag/{$tag}";
        } else {
            $next['Path'] = "/?tag/{$tag}/";
        }
        $content['Title'] = "Pages tagged: <a href='{$previous['Path']}' title='Previous - {$previous['Title']}'>⟨</a> {$cleanTag} <a href='{$next['Path']}' title='Next - {$next['Title']}'>⟩</a>";
        $pageQuery = "SELECT `ID`,`Path`,`Title`,`Content`,`Edits`, `EditTime`\n\t\t\t\t\t\tFROM `Wiki_Pages`,\n\t\t\t\t\t\t\t `Wiki_Tags` as tag\n\t\t\t\t\t\tWHERE tag.`tag` = '{$tag}' and tag.`pageID` = `ID`\n\t\t\t\t\t\torder by tag.`tagID` desc";
        list($Data, $Links) = Paginate($pageQuery, 50, $_GET['page'], $_SERVER['QUERY_STRING']);
        if ($Data) {
            $content['Body'] .= "<center class='page-navigation'>{$Links}</center>";
            foreach ($Data as $Result) {
                list($pageID, $pagePath, $pageTitle, $pageContent) = $Result;
                $tagQuery = mysql_query("Select tags.`tag`, stats.`count`\n\t\t\t\t\t\t\t\t\t\t\tfrom `Wiki_Tags` as tags,\n\t\t\t\t\t\t\t\t\t\t\t\t `Wiki_Tag_Statistics` as stats\n\t\t\t\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\t\t\twhere tags.`pageID` = '{$pageID}'\n\t\t\t\t\t\t\t\t\t\t\t\tand stats.`tag` = tags.`tag`");
                $tagLinks = array();
                while (list($tagName, $tagCount) = mysql_fetch_array($tagQuery)) {
                    $plural = 's';
                    if ($tagCount == 1) {
                        $plural = '';
                    }
                    $tagLink = urlencode($tagName);
                    $tagTitle = str_replace('-', ' ', $tagName);
                    $tagLinks[] = "<a href='/?tag/{$tagLink}' title='{$tagCount} tagged page{$plural}'>{$tagTitle}</a>";
                }
                $tagLinks = implode(" | ", $tagLinks);
                if ($Count % 4 == 1 or $Count % 4 == 2) {
                    $class = 'toggle';
                } else {
                    $class = '';
                }
                if ($Count % 2 == 0) {
                    $content['Body'] .= "<div class='clear'></div>";
                }
                $content['Body'] .= "<div class='{$class}' style='float:left; width:50%'><div style='padding:16px'>";
                $content['Body'] .= "<a href='/{$pagePath}/?tag/{$tag}' style='font-weight:bold'>{$pageTitle}</a><br />";
                $content['Body'] .= "Tags: {$tagLinks}";
                $content['Body'] .= "</div></div>";
                $Count++;
            }
            $content['Body'] .= "<div class='clear'></div>";
            $content['Body'] .= "<center class='page-navigation bottom'>{$Links}</center>";
        }
        if (empty($Count)) {
            $content['Body'] .= "<br /><b>Sorry friend, it appears the tag you're looking for doesn't exist.</b>";
        }
    }
    if ($tagTotal == 1) {
        $footerPlural = '';
    } else {
        $footerPlural = 's';
    }
    /*
    if($previous['Path'])
    	$previous['Path'] = "/{$previous['Path']}/?tag/$tag";
    else
    	$previous['Path'] = "/?tag/$tag/";
    
    if($next['Path'])
    	$next['Path'] = "/{$next['Path']}/?tag/$tag";
    else
    	$next['Path'] = "/?tag/$tag/";
    */
    $content['Body'] .= <<<JavaScript
\t
\t<script>
\t\t\$(document).ready(function ()
\t\t{
\t\t\t\$('body').on('keydown', function(event)
\t\t\t{
\t\t\t\t// what?

\t\t\t\tevent.stopImmediatePropagation()
\t\t\t\t
\t\t\t\tif(event.keyCode == 37) // Previous
\t\t\t\t\tlocation.href = '{$previous['Path']}';
\t\t\t\telse if(event.keyCode == 39) // Next
\t\t\t\t\tlocation.href = '{$next['Path']}';

\t\t\t\t\t
\t//\t\t\tconsole.log(event);
\t\t\t});
\t\t});
\t</script>
\t
JavaScript;
    $content['Footer'] = " <a href='{$previous['Path']}' title='Previous - {$previous['Title']}'>Previous</a> &emsp; You are browsing <b><a href='/?tag/{$tag}'>{$cleanTag}</a></b>, this tag appears on <b>{$tagTotal}</b> page{$footerPlural}. &emsp; <a href='{$next['Path']}' title='Next - {$next['Title']}'>Next</a>";
    return array($title, $content);
}
예제 #18
0
 function set_paffec_notes($paffec_notes)
 {
     $this->paffec_notes = Clean($paffec_notes);
 }
예제 #19
0
파일: missingno.php 프로젝트: kelsh/classic
        $Count = 0;
    }
    return $Count;
}
function CountDown($Count, $Files)
{
    $Count--;
    if ($Count < 0) {
        $Count = count($Files) - 1;
    }
    return $Count;
}
if ($Handle = opendir("tiles/")) {
    while (FALSE !== ($File = readdir($Handle))) {
        if (preg_match("/.*?\\.png/", $File)) {
            $Files[] = Clean($File);
        }
    }
    closedir($Handle);
}
Shuffle($Files);
$Count = 0;
$MissingNo = ImageCreateTrueColor(512, 512);
for ($X = 0; $X < 511; $X += 16) {
    for ($Y = 0; $Y < 511; $Y += 16) {
        $Piece = @ImageCreateFromPNG("tiles/" . $Files[$Count]);
        if (rand(0, 2) == 0) {
            $Count = CountUp($Count, $Files);
        }
        @ImageCopy($MissingNo, $Piece, $X, $Y, 0, 0, 32, 32);
        @ImageDestroy($Piece);
예제 #20
0
파일: search.php 프로젝트: kelsh/classic
<form>
	<input type='text' name='q' value='<?php 
echo $_GET['q'];
?>
' /> <input type='submit' value='Go!' />
</form>

<?php 
require 'functions.php';
include 'fun/paginate.php';
$Search = Clean($_GET['q']);
if ($Search) {
    $Query = "Select `Path`, `Title`, `Content`\r\n\t\t\t\tfrom `Wiki_Pages`\r\n\t\t\t\twhere match(`Path`, `Title`, `Content`)\r\n\t\t\t\tagainst('{$Search}')";
    $Results = mysql_num_rows(mysql_query($Query));
    $Time = time();
    if (isset($_SERVER['HTTP_X_FORWARDED_FOR'])) {
        $userIP = $_SERVER['HTTP_X_FORWARDED_FOR'];
    } else {
        $userIP = $_SERVER['REMOTE_ADDR'];
    }
    // Make sure the user IP is sanitized
    $userIP = preg_replace('/[^0-9.]/', '', $userIP);
    list($Data, $Links) = Paginate($Query, 25, $_GET['page'], $_SERVER['QUERY_STRING']);
    echo "<hr /><center>{$Links}</center><hr />";
    if ($Data) {
        foreach ($Data as $Result) {
            list($Path, $Title, $Content) = $Result;
            echo "<a href='/{$Path}' style='font-weight:bold'>{$Title}</a><br />";
            echo substr($Content, 0, 255);
            echo "<hr />";
            $Count++;
예제 #21
0
<?php

// Check if we're instaling, if so, display another page
if (isset($_GET['install'])) {
    include 'modules/installscripts/allscripts/install.php';
    exit;
}
function GetCat($id)
{
    global $DB;
    $name = $DB->GetOne("SELECT name FROM zantastico_categories WHERE id='{$id}'");
    return $name;
}
if (isset($_GET['catid'])) {
    $where = "WHERE catid='" . Clean($_GET['catid'], 1) . "' ";
    $cat = GetCat(Clean($_GET['catid'], 1));
} else {
    $where = '';
    $cat = 'All Scripts';
}
// Get packages installed
$pkresult = $DB->GetAll('SELECT * FROM zantastico ' . $where . 'ORDER BY name ASC');
$pkcount = $DB->GetOne('SELECT COUNT(*) FROM zantastico ' . $where);
?>
<p>We have made it easier than ever to install helpful applications into your hosting. Below is a list of available applications. If you'd like to see another application available, please let us know.</p>

<h1><?php 
echo $cat;
?>
</h1>
<table width="100%">
예제 #22
0
파일: blog.php 프로젝트: kelsh/classic
         if ($Errors['Author'] != "") {
             $Content .= "<tr><td colspan='2'>" . $Errors['Author'] . "</td></tr>";
         }
         $Content .= "<tr><td>Author:</td><td><input type='text' name='Author' value='{$Author}'></td></tr>";
         if ($Errors['Comment'] != "") {
             $Content .= "<tr><td colspan='2'>" . $Errors['Comment'] . "</td></tr>";
         }
         $Content .= "<tr><td>Post:</td><td><textarea name='Comment' rows='4' cols='40'>{$Comment}</textarea></td></tr>";
         $Content .= "<tr><td colspan='2'><input type='submit' value='Submit'></td></tr>";
         $Content .= "</table></form>";
     }
 } else {
     if (!empty($_POST)) {
         $Author = Clean($_POST['Author']);
         $Password = Clean($_POST['Password']);
         $Post = Clean($_POST['Post'], "textarea");
         if ($Author == "") {
             $Errors['Author'] = "Error: You must enter a name!";
         } elseif (strlen($Author) > 32) {
             $Errors['Author'] = "Error: Your name is too long!";
         }
         if ($Password != "qwerty") {
             $Errors['Password'] = "******";
         }
         if ($Post == "") {
             $Errors['Post'] = "Error: You must write something.";
         } elseif (strlen($Post) > 5000) {
             $Errors['Post'] = "Error: Oh come on, your life isn't THAT interesting.";
         }
         if (empty($Errors)) {
             $Time = time();
예제 #23
0
// Handle the login process
if (isset($_POST['username'])) {
    $dbcall = $DB->GetRow("SELECT * FROM accounts WHERE username='******'username'], 1) . "' AND password='******'password']) . "'");
    if (count($dbcall) > 0) {
        // Are they suspended?
        if ($dbcall['status'] == 1) {
            // The user exists and password matches, create session
            $_SESSION['username'] = $dbcall['username'];
            $_SESSION['password'] = $_POST['password'];
            die('<script language="javascript">window.location="zpanel.php";</script>You\'re logged in, but don\'t have javascript enabled. Most of ZPanel will not work correctly without Javascript. Please enable it.<br /><br />To continue, <a href="zpanel.php">click here</a>.');
        } else {
            $alert = 'Your account is currently suspended. Please contact support.';
        }
    } else {
        ini_set('display_errors', 'yes');
        LogFailure(Clean($_POST['username'], 1));
        $alert = 'That username or password is incorrect.';
    }
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
		<title><?php 
echo $config['company'];
?>
 &bull; ZPanel Login</title>
		<link rel="stylesheet" type="text/css" href="style.css" title="Default">
	</head>
예제 #24
0
/**
 * 页面重定向
 *
 * @param string $url 地址
 */
function redirect($url)
{
    Clean();
    header("Location: " . $url);
    msg('<meta http-equiv="refresh" content="0; url=' . htmlspecialchars($url) . '" />请稍候......<br/><br/>如果您的浏览器没有自动跳转,请点击下面的链接', htmlspecialchars($url));
}
예제 #25
0
파일: poste_class.php 프로젝트: japila/nomi
 function set_poste_proc($poste_proc)
 {
     $this->poste_proc = Clean($poste_proc);
 }
if (!defined('SYSTEM_ROOT')) {
    die('Insufficient Permissions');
}
global $i;
switch ($i['mode'][0]) {
    case 'baiduid':
        loadhead('百度账号管理');
        template('baiduid');
        break;
    case 'showtb':
        loadhead('云签到设置和日志');
        template('showtb');
        break;
    case 'log':
        //兼容老版本插件,重定向到showtb
        Clean();
        ReDirect('index.php?mod=showtb');
        break;
    case 'set':
        loadhead('个人设置');
        template('set');
        break;
    case 'admin':
        if (ROLE != 'admin') {
            msg('权限不足!');
        }
        switch ($i['mode'][1]) {
            case 'set':
                loadhead('全局设置');
                template('admin-set');
                break;
예제 #27
0
파일: pu_class.php 프로젝트: japila/budget
 function set_pu_role($pu_role)
 {
     $this->pu_role = Clean($pu_role);
 }