" method="post" onsubmit="return checkCoords();"> <input type="hidden" id="x" name="x" /> <input type="hidden" id="y" name="y" /> <input type="hidden" id="w" name="w" /> <input type="hidden" id="h" name="h" /> <input type="submit" value="weiter" /> <p style="margin: 0 0 0 0px; font-size: 90%;"> </p> </form> </td> </tr> <tr> <td colspan='2' align="center"> <!-- This is the image we're attaching Jcrop to --> <img src="getimage.php?nocrop=1&rand=<?php echo rand(0, 100000); ?> " id="cropbox" /> </td> </tr> </table> <?php echo create_footer(""); ?>
<?php /* Copyright (c) H. Reimers reimers@heye-tammo.de*/ require_once '../preload.php'; //Create Session an load Config check_login_logout("upload"); echo create_header($_SESSION["settings"]["html_title"], "", "", "", "", "logolisa.svg"); ?> <h3>LiSA - Upload!</h3> <p> <form action='select_class.php' method='POST' > <input type='submit' value='Bilder einer Klasse hochladen'> </form> </p> <?php $body = "<br>IP:" . $_SERVER["REMOTE_ADDR"] . "<br>"; echo create_footer("{$body}"); ?>
<?php /* Copyright (c) H. Reimers reimers@heye-tammo.de Info: Icons: http://commons.wikimedia.org/wiki/User:Seahen/gallery Images Demodate http://openclipart.org **/ /* $path=$_SERVER["REQUEST_SCHEME"]."://".$_SERVER["HTTP_HOST"].pathinfo($_SERVER["PHP_SELF"])["dirname"]."/eingabe/index.php"; header("Location: $path"); exit; */ require_once 'preload.php'; //Create Session an load Config $meta_refresh = "<meta http-equiv='refresh' content='10; URL=eingabe/index.php'>"; $body = "<h2>Welcome to LiSA</h2>\n\t\t\t<a href='eingabe/'>Eingabe neuer Daten</a> - \n\t\t\t<a href='print/'>Drucken/Download</a> - \n\t\t\t<a href='upload/'>Upload</a> - \t\t\t\n\t\t\t<a href='edit/'>Schülerdaten ändern</a> - \n\t\t\t<a href='admin/'>Einstellungen ändern</a> <br><br>\n\t\t\t"; $html_title = isset($_SESSION["settings"]["html_title"]) ? $_SESSION["settings"]["html_title"] : 'LiSA'; $lisa_web_base_path = isset($_SESSION["lisa_web_base_path"]) ? $_SESSION["lisa_web_base_path"] : ''; echo create_header($html_title, "", "", $meta_refresh, $body, "logolisa.svg", false); echo create_footer("", $lisa_web_base_path); ?>
function index_suspended() { global $db_con, $mysql_table_prefix, $command_line, $debug, $use_robot, $use_nofollow, $no_log, $clear, $started, $cl; $started = time(); $reindex = 0; printStandardReport('SuspendedStart', $command_line, $no_log); // get ID and URL of all sites $sql_query = "SELECT site_id, url from " . $mysql_table_prefix . "sites ORDER by url"; $result1 = $db_con->query($sql_query); if ($debug && $db_con->errno) { $err_row = __LINE__ - 2; printf("<p><span class='red'> MySQL failure: %s \n<br /></span></p>", $db_con->error); if (__FUNCTION__) { printf("<p><span class='red'> Found in script: " . __FILE__ . " row: {$err_row} in function(): " . __FUNCTION__ . " <br /></span></p>"); } else { printf("<p><span class='red'> Found in script: " . __FILE__ . " row: {$err_row} <br /></span></p>"); } printf("<p><span class='red'> Script execution aborted. <br /></span>"); printf("<p><strong>Invalid query string, which caused the SQL error:</strong></p>"); echo "<p> {$sql_query} </p>"; exit; } while ($row1 = $result1->fetch_array(MYSQLI_NUM)) { $url = $row1[1]; $site_id = $row1[0]; // check whether this site is pending $sql_query = "SELECT site_id from " . $mysql_table_prefix . "pending where site_id ={$site_id}"; $result2 = $db_con->query($sql_query); $row2 = $result2->fetch_array(MYSQLI_ASSOC); // if pending, continue indexing this URL if ($row2['site_id'] == $site_id) { // fetch all important data of this site $sql_query = "SELECT url, spider_depth, required, disallowed, can_leave_domain, use_prefcharset from " . $mysql_table_prefix . "sites where url='{$url}'"; $result = $db_con->query($sql_query); if ($row = $result->fetch_array(MYSQLI_NUM)) { $maxlevel = $row[1]; $in = $row[2]; $out = $row[3]; $domaincb = $row[4]; $use_prefcharset = $row[5]; if ($domaincb == '') { $domaincb = 0; } if ($maxlevel == -1) { $soption = 'full'; } else { $soption = 'level'; } } if ($clear == 1) { clean_resource($result, '21'); } if (!isset($in)) { $in = ""; } if (!isset($out)) { $out = ""; } // now indnex the rest of this site index_site($url, $reindex, $maxlevel, $soption, $in, $out, $domaincb, $use_robot, $use_nofollow, $cl, $all, $use_prefcharset); } } if ($clear == 1) { clean_resource($result, '20'); } $ended = time(); $consumed = $ended - $started; printConsumedReport('consumed', $cl, '0', $consumed); printStandardReport('SuspendedFinish', $command_line, '0'); create_footer(); }
<?php session_start(); // Aloitetaan istunto. require_once 'kokonaisuudet/asetukset/tietokantayhteys.php'; require_once 'kokonaisuudet/yhteiset/php_yhteismetodit.php'; load_files("home"); $head = create_head(); $nav = create_nav(); $footer = create_footer(); $content = create_content(); $content_container = Html::luo_div($content, array(Attr::classs("container text-center"))); $html = Html::luo_body($head . $nav . $content_container . $footer, array()); $doc = Html::luo_html($html, array()); echo $doc; //===================== Funktiot =========================================== /** * Creates the html for head element with addresses for Bootstrap. * @return type */ function create_head() { $text = Html::luo_head(Html::luo_title(Tekstit::$home_title, array()) . Html::luo_link_to_stylesheet("http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css") . Html::luo_link_to_stylesheet("css/etusivutyylit.css") . Html::luo_script_to_js("https://ajax.googleapis.com/ajax/libs/jquery/1.12.2/jquery.min.js") . Html::luo_script_to_js("http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js") . Html::luo_meta(array(Attr::charset("utf-8"))) . Html::luo_meta(array(Attr::name("viewport"), Attr::content("width=device-width, initial-scale=1"))), array()); return $text; } /** * Creates the html for the main content. */ function create_content() { $content = Html::luo_div(Html::luo_div(Html::luo_div(Html::luo_otsikko(Tekstit::$home_heading_main, array(Attr::classs("")), 1) . Html::luo_p(Tekstit::$home_wellcome_text, array()), array(Attr::classs("col-sm-12"))), array(Attr::classs("row"))) . Html::luo_div(Html::luo_div(Html::luo_div(Html::luo_otsikko(ucwords(Tekstit::$oppiaine_nimi_MA), array(Attr::classs("")), 3) . create_links_of_subject(Oppiaineet::$MA), array(Attr::classs("well"))), array(Attr::classs("col-sm-4"))) . Html::luo_div(Html::luo_div(Html::luo_otsikko(ucwords(Tekstit::$oppiaine_nimi_TT), array(Attr::classs("")), 3) . create_links_of_subject(Oppiaineet::$TT), array(Attr::classs("well"))), array(Attr::classs("col-sm-4"))) . Html::luo_div(Html::luo_div(Html::luo_otsikko(ucwords(Tekstit::$oppiaine_nimi_FY), array(Attr::classs("")), 3) . create_links_of_subject(Oppiaineet::$FY), array(Attr::classs("well"))), array(Attr::classs("col-sm-4"))), array(Attr::classs("row"))), array(Attr::classs("container text-center")));
function index_new() { global $command_line, $use_robot; $reindex == 0; //include "admin_header.php"; printStandardReport('NewStart', $command_line); $result = mysql_query("select url, indexdate, spider_depth, required, disallowed, can_leave_domain from " . TABLE_PREFIX . "sites"); if (DEBUG > '0') { echo mysql_error(); } while ($row = mysql_fetch_row($result)) { $url = $row[0]; $indexdate = $row[1]; $depth = $row[2]; $include = $row[3]; $not_include = $row[4]; $can_leave_domain = $row[5]; if ($can_leave_domain == '') { $can_leave_domain = 0; } if ($depth == -1) { $soption = 'full'; } else { $soption = 'level'; } if ($indexdate == '') { index_site($url, 1, $depth, $soption, $include, $not_include, $can_leave_domain, $use_robot); } } clean_resource($result); printStandardReport('NewFinish', $command_line); create_footer(); }
function test_session($step) { //Schutz vor Sessionübernahme durch andere IPs if (isset($_SERVER["REMOTE_ADDR"])) { //Kontrolle ob Session von einer anderen IP gekapert wurde. if (isset($_SESSION["REMOTE_ADDR"])) { if ($_SESSION["REMOTE_ADDR"] != $_SERVER["REMOTE_ADDR"]) { echo create_header("Fehler", "", "", "", ""); $msg = "Fehler, Client-IP der Session wurde verändert!<br>Abbruch!"; create_footer($msg); exit(0); } } else { $_SESSION["REMOTE_ADDR"] = $_SERVER["REMOTE_ADDR"]; } } else { echo create_header("Fehler", "", "", "", ""); $msg = "Interner Fehler, kann Client-IP nicht ermitteln<br>Abbruch!"; create_footer($msg); exit(0); } //Test ob die allgemeinen Einstellungen geladen wurden if (!isset($_SESSION["settings"])) { echo create_header("Fehler", "", "", "", ""); echo "<div align='center' id='main'>\n\t\t\t\t\t\t<h3> Bitte beginnen Sie von vorne! </h3>"; print_button("index.php", "button_check_data", "zurück"); echo "\t\t</div>"; create_footer(""); exit(0); } $back2start = false; if (isset($_SESSION["step"])) { if ($_SESSION["step"] >= $step - 1) { if ($_SESSION["step"] == $step - 1) { $_SESSION["step"]++; } } else { echo "Fehlerhafte Reihenfolge<br>"; $back2start = true; } } else { echo "Datenfehler<br>"; $back2start = true; } if ($back2start == true) { echo "<a href='index.php'>Neue Eingabe</a><br>"; exit(0); } }
function check_login_logout($area = false) { if ($area == false) { //Get folder name = area (admin, print, upload, ...) $path = pathinfo($_SERVER["SCRIPT_FILENAME"]); $path = explode("/", $path["dirname"]); $area = trim($path[sizeof($path) - 1]); } if (isset($_POST["logout"]) or isset($_GET["logout"])) { if (isset($_SESSION["LOGINAREA"])) { $_SESSION["LOGINAREA"] = false; unset($_SESSION['LOGINAREA']); } } else { if (isset($_SESSION["LOGINAREA"])) { //Logout ??? //Bereits in dem bereich eingeloggt? if ($_SESSION["LOGINAREA"] == $area) { return true; } } } //if( check_ip() ) return true; if (isset($_POST["password"])) { if (check_passwd($area, $_POST["password"])) { $_SESSION["LOGINAREA"] = $area; //Anmeldung in Session speichern return true; } } else { if (check_passwd($area, false)) { $_SESSION["LOGINAREA"] = $area; //Anmeldung in Session speichern return true; } } echo create_header($_SESSION["settings"]["html_title"], "", "", "", "", "logolisa.svg"); echo "<form action='' method='POST'>\n\t\t\t" . ucfirst($area) . "-Passwort: <input type='password' name='password'>\n\t\t\t<input type='submit' value='anmelden'>\n\t\t\t</form>\n\t\t"; echo create_footer(); exit(0); }