Esempio n. 1
0
File: boot.php Progetto: philum/cms
function define_hubs()
{
    $_SESSION['mn'] = '';
    $qdu = $_SESSION['qdu'];
    $USE = $_SESSION['USE'];
    $exists = rse('id', $qdu . ' WHERE id=1');
    if (!$exists) {
        $_SESSION['stsys'] = 'no';
        $_SESSION['first'] = 1;
        alert(loged('', '', 'superadmin'));
    }
    $wh = ' WHERE active="1" ';
    //if(!auth(7))else $wh='';
    $req = res('name,hub,id,active', $qdu . $wh . ' ORDER BY nbarts DESC');
    if ($req) {
        while ($r = mysql_fetch_row($req)) {
            // && ($r[3] or auth(6))
            $hub = $r[1] ? $r[1] : $r[0];
            $ret[$r[0]] = $hub;
            $rtb[$r[0]] = $r[2];
        }
    }
    $_SESSION['mn'] = $ret;
    $_SESSION['mnd'] = $rtb;
    if (!$_SESSION['mn'][$USE] && $USE) {
        define_closed_hub($USE);
    }
}
Esempio n. 2
0
 public static function make($name, $seed = 0)
 {
     $im = imagecreate(120, 60);
     $bg = imagecolorallocate($im, 240, 240, 240);
     srand($seed && is_numeric($seed) ? $seed : time());
     $text_colors = array();
     for ($i = 0; $i < 4; $i++) {
         $nr[$i] = rand(0, 9);
         $textcolor = imagecolorallocate($im, rand(50, 150), rand(50, 150), rand(50, 150));
         $text_colors[] = $textcolor;
         imagettftext($im, rand(25, 35), rand(-15, 15), $i * 27 + 5, rand(35, 50), $textcolor, $_SERVER['DOCUMENT_ROOT'] . res('assets/font/capcha.ttf'), $nr[$i]);
     }
     for ($i = 0; $i <= 2; $i++) {
         $line_color = $text_colors[mt_rand(0, count($text_colors) - 1)];
         imageline($im, mt_rand(0, 120), 0, mt_rand(0, 120), 60, $line_color);
         imageline($im, 0, mt_rand(0, 60), 120, mt_rand(0, 60), $line_color);
     }
     $codes = implode('', $nr);
     Session::put('capcha_' . $name, $codes);
     ob_start();
     imagepng($im);
     $imagedata = ob_get_contents();
     ob_end_clean();
     return "data:image/png;base64," . base64_encode($imagedata);
 }
Esempio n. 3
0
function raspiSensorGetSensorDataLast($mysqli, $sensorID)
{
    if ($result = $mysqli->query("SELECT * FROM sensorData WHERE sensorID='" . res($sensorID) . "' ORDER BY date DESC LIMIT 1")) {
        $row = $result->fetch_assoc();
        $out = floatval($row['dataRefined']);
        $result->free();
    }
    return $out;
}
 function display()
 {
     global $websiteName;
     $content = $this->parse_legacy($this->content);
     $title = $this->parse_legacy($this->title);
     $header = $this->parse_legacy($this->header);
     $display = trim(str_replace("\n", ' ', '<!doctype html><html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><style type="text/css" media="all">@import "/d/s.css";</style>' . $this->style . '<title>' . $title . '</title></head><body><div class="greenpage"></div><div class="fh"><a href="/" id="tl"><i>' . $websiteName . '</i></a></div><div id="content"><h1>' . $header . '</h1>' . $content . res('4.d2')));
     echo $display;
 }
Esempio n. 5
0
 public function insert($params)
 {
     if (isset($params['model_id'])) {
         unset($params['model_id']);
     }
     //插入模型
     $res = $this->dbm->single_insert($this->table, $params);
     if (empty($res['error'])) {
         return res(0, $res['autoid']);
     }
     return res(100, $res['error']);
 }
Esempio n. 6
0
 public function update($params, $group_id)
 {
     if (isset($params['group_id'])) {
         unset($params['group_id']);
     }
     $where = " group_id='" . $group_id . "'";
     $res = $this->dbm->single_update($this->table, $params, $where);
     if (empty($res['error'])) {
         return res(0);
     }
     return res(100, $res['error']);
 }
Esempio n. 7
0
 function res($cur_category, $s)
 {
     $children_categories = $cur_category->getChildrenCategories();
     if (!empty($children_categories)) {
         $s .= $s;
         foreach ($children_categories as $k => $v) {
             $all_data = $v->getData();
             $nm = $all_data['name'];
             echo $s . $nm . '<br/>';
             res($v, $s);
         }
     }
 }
Esempio n. 8
0
 public function update($params, $flink_id)
 {
     if (isset($params['flink_id'])) {
         unset($params['flink_id']);
     }
     $where = " flink_id = " . $flink_id;
     $res = $this->dbm->single_update($this->table, $params, $where);
     print_r($res);
     if (empty($res['error'])) {
         return res(0);
     }
     return res(100, $res['error']);
 }
function e($content, $pageVersionDirect)
{
    global $websiteName;
    global $cssFile;
    global $serverUrl;
    global $pageClass;
    if ($pageClass == 'w') {
        $tbl = '';
    } else {
        $tbl = '<table border="0" cellpadding="24" width="100%"><tbody><tr><td><br><h1>';
    }
    $univNeedles = array('href="' . $serverUrl, "\t", "\n", "\r", "  ", "  ", "  ", "> <", '@p1@', '@p2@', '@p3@', '@p4@', '@cssFile@', '@websiteName@', '@tbl@', '@l@', '@n@', 'https://futuramerlincom.fatcow.com', '@greenhead@', '@sylfan2@', '@bonnou@', '@bonnousuper@', '@fullmoon@', '@yy@', '@sumquiaestis@', '@128@', '@flautrock@', '@taito@', '@itfaen@', '.css";</style></title>');
    $univHaystacks = array('href="', " ", " ", " ", " ", " ", " ", '><', res('1.d' . $pageVersionDirect), res('2.d' . $pageVersionDirect), res('3.d' . $pageVersionDirect), res('4.d' . $pageVersionDirect), $cssFile, $websiteName, $tbl, '<a href="r.php?', '">', 'http://localhost', '<div class="greenpage"></div><div class="fh"><a href="/" id="tl"><i>futuramerlin</i></a></div>', getmusic('sylfan2'), getmusic('bonnou'), getmusic('bonnousuper'), getmusic('fullmoon'), getmusic('yy'), getmusic('sumquiaestis'), getmusic('128'), getmusic('flautrock'), getmusic('taito'), getmusic('itfaen'), '.css";</style>');
    echo trim(str_replace("\n", ' ', str_replace($univNeedles, $univHaystacks, $content)));
}
Esempio n. 10
0
function check($user, $pass)
{
    try {
        $db = new SQLite3(':memory:');
        $db->query('CREATE TABLE IF NOT EXISTS users (username TEXT, password TEXT)');
        $us = array('admin', 'user', 'member', 'bob');
        foreach ($us as $u) {
            $db->query("INSERT INTO users (username, password) SELECT '" . $u . "', '" . generatePassword() . "' WHERE NOT EXISTS (SELECT 1 FROM users WHERE username = '******')");
        }
        if (strlen($user) > 32 || strlen($pass) > 32) {
            res('Username or password too long!');
        }
        $res = $db->query("SELECT COUNT(*) FROM users WHERE username = '******' AND password = '******'");
        if (!$res) {
            res('SQL Error: ' . $db->lastErrorMsg());
        }
        $row = $res->fetchArray();
        return $row[0] != 0;
    } catch (Exception $e) {
        res('Error: ' . $e->getMessage());
        error_log($e);
    }
}
Esempio n. 11
0
 public function delete_nlink($id)
 {
     $where = " nlink_id = " . $id;
     $res = $this->dbm->single_del($this->table, $where);
     if (empty($res['error'])) {
         return res(0);
     }
     return res(100, $res['error']);
 }
Esempio n. 12
0
" class="stat_active">
            <div class="stat_info">
                <span><?php 
    echo varlang('statut');
    ?>
</span>
                <span><?php 
    echo varlang('consultare-activa');
    ?>
</span>
            </div>
        <?php 
} else {
    ?>
            <img alt=""  src="<?php 
    echo res('assets/img/stat_off.png');
    ?>
" class="stat_active">
            <div class="stat_info">
                <span><?php 
    echo varlang('statut');
    ?>
</span>
                <span><?php 
    echo varlang('consultare-inchisa');
    ?>
</span>
            </div>
        <?php 
}
?>
Esempio n. 13
0
    return res('CREATE', $status);
});
/* UPDATE */
$uri = '/users/{id:[0-9]+}';
$app->put($uri, function ($id) use($app) {
    $row = $app->request->getJsonRawBody();
    $phql = "UPDATE Users SET\n    name = :name:,\n    email = :email:\n  WHERE id = :id:";
    $status = $app->modelsManager->executeQuery($phql, array('id' => $id, 'name' => $row->name, 'email' => $row->email));
    return res('UPDATE', $status);
});
/* DELETE */
$uri = '/users/{id:[0-9]+}';
$app->delete($uri, function ($id) use($app) {
    $phql = "DELETE FROM Users WHERE id = :id:";
    $status = $app->modelsManager->executeQuery($phql, array('id' => $id));
    return res('DELETE', $status);
});
/* response */
function res($req, $res)
{
    $response = new Response();
    $response->setContentType('application/json');
    switch ($req) {
        case 'INDEX':
            if ($res == false) {
                $response->setJsonContent(array('status' => 'NOT-FOUND'));
            } else {
                $response->setJsonContent(array('status' => 'FOUND', 'data' => $res));
            }
            break;
        case 'READ':
Esempio n. 14
0
                                </a></li>
                        <?php 
    }
    ?>
                    </ul>
                </article>
            <?php 
}
?>

            <?php 
if (isset($home_posts) && count($home_posts)) {
    ?>
                <article class="news">
                    <p class="ttl"><img src="<?php 
    echo res('assets/img/stiri.png');
    ?>
" alt="" ><a href="<?php 
    echo Language::url('topage/newsList');
    ?>
"><?php 
    echo varlang('stiri');
    ?>
</a></p>
                    <div class="hr"></div>
                    <ul>
                        <?php 
    foreach ($home_posts as $item) {
        ?>
                            <li>
                                <?php 
Esempio n. 15
0
"></script>
<script src="<?php 
echo res('assets/js/icheck.js');
?>
"></script>
<script src="<?php 
echo res('assets/js/jquery.bxslider.min.js');
?>
"></script>
<script src="<?php 
echo res('assets/js/jquery.cookie.js');
?>
"></script>
<script src="https://maps.googleapis.com/maps/api/js?v=3.exp"></script>
<script src="<?php 
echo res('assets/js/vendor/modernizr-2.6.2.min.js');
?>
"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.9.2/jquery-ui.min.js"></script>
<script src="<?php 
echo res('assets/js/jquery.selectBoxIt.min.js');
?>
"></script>
<script src="<?php 
echo res('assets/js/main.js');
?>
"></script>

</body>
</html>
<?php

//This is a normal webpage
if (strlen(res(str_replace('//', '/', 'p/' . $pageClass . '/' . $pageAction . '.s#p3'))) !== 0) {
    //Version 3 processor
    global $dataDirectory;
    include $dataDirectory . str_replace('//', '/', 'p/' . $pageClass . '/' . $pageAction . '.s#p3');
} else {
    //This handles pre-version 3 pages
    global $pageVersion;
    if ($pageClass) {
        $pageLoc = 'p/' . $pageClass . '/' . $pageAction . '.p2';
    } else {
        $pageLoc = 'p/' . $pageAction . '.p2';
    }
    $pageVersion = '2';
    if (strlen($pageLoc) == 0) {
        if ($pageClass) {
            $pageLoc = 'p/' . $pageClass . '/' . $pageAction . '.p';
        } else {
            $pageLoc = 'p/' . $pageAction . '.p';
        }
        $pageVersion = '';
    }
    e(res($pageLoc), $pageVersion);
}
Esempio n. 17
0
         $config = $result->fetch_assoc();
         $result->free();
         $deadLineDate = $config["deadLineDate"];
         $exploded = explode(" ", $deadLineDate);
         $deadLineDate = $exploded[0] . "T" . $exploded[1];
         echo "\n\t\t\t\t<div class='row'>\n\t\t\t\t<div class='col-md-1'></div>\n\t\t\t\t<div class='col-md-10'>\n\t\t\t\t\t<form action='index.php?adminpage=6&modify' method='POST' id='configForm'>\n\t\t\t\t\t<table class='table'>\n\t\t\t\t\t  <thead>\n\t\t\t\t\t  <tr>\n\t\t\t\t\t    <th>Téma neve</th>\n\t\t\t\t\t    <th>Főcím</th>\n\t\t\t\t\t    <th>Esemény éve a címben</th>\n\t\t\t\t\t    <th>Esemény dátuma</th>\n\t\t\t\t\t    <th>Jelentkezési határidő</th>\n\t\t\t\t\t  </tr>\n\t\t\t\t\t  </thead>\n\t\t\t\t\t  <tbody>\n\t\t\t\t\t  <tr class='active'>\n\t\t\t\t\t    <td><select class='form-control' name='currentTheme' require='require'>\n\t\t\t\t\t\t\t\t<option name='currentTheme' ";
         echo $config["currentTheme"] == 'illyesnapok' ? 'checked' : '';
         echo ">illyesnapok</option>\n\t\t\t\t\t\t\t\t<option name='currentTheme' ";
         echo $config["currentTheme"] == 'egyosznap' ? 'checked' : '';
         echo ">egyosznap</option>\n\t\t\t\t\t\t\t</select>\n\t\t\t\t\t    </td>\n\t\t\t\t\t    <td><input type='text' name='maintitle' maxlength='15' value='" . $config["maintitle"] . "'  require='require'></td>\n\t\t\t\t\t    <td><input type='number' name='titleYear' min='2016' max='9999' value='" . $config["titleYear"] . "'  require='require'></td>\n\t\t\t\t\t    <td><input type='text' name='date' maxlength='20' value='" . $config["date"] . "'></td>\n\t\t\t\t\t    <td><input type='datetime-local' name='deadLineDate' value='" . $deadLineDate . "' step=1 require='require'>\n\t\t\t\t\t    \t<br><small>(Y-m-d H:i:s)</small></td>\n\t\t\t\t\t  </tr>\n\t\t\t\t\t  <tr class='active'>\n\t\t\t\t\t  \t<td colspan='5'><input type='submit' value='Futtatás' class='pull-right btn btn-raised btn-primary'></td>\n\t\t\t\t\t  </tr>\n\t\t\t\t\t</form>\n\t\t\t\t</div>\n\t\t\t\t<div class='col-md-1'></div>\n\t\t\t\t</div>\n\t\t\t\t";
     } else {
         $currentTheme = res($_POST["currentTheme"]);
         $maintitle = res($_POST["maintitle"]);
         $titleYear = res($_POST["titleYear"]);
         $date = res($_POST["date"]);
         $deadLineDate = res($_POST["deadLineDate"]);
         $exploded = explode("T", $deadLineDate);
         $deadLineDate = $exploded[0] . " " . $exploded[1];
         if ($db->query("UPDATE config SET currentTheme = '{$currentTheme}', maintitle = '{$maintitle}', titleYear = '{$titleYear}', date = '{$date}', deadLineDate = '{$deadLineDate}' ")) {
             echo $headerText . "</div>\n\n\t\t\t\t<div class='alert alert-success'>\n\t\t\t\t\t<h3>A rendszer beállításait sikeresen módosítottad.</h3>\n\t\t\t\t\t<a href='?adminpage=6' class='btn btn-success btn-raised'>Vissza</a>\n\t\t\t\t</div>\n\t\t\t\t";
             header("Refresh: 3; url=?adminpage=1");
             exit;
         } else {
             echo $headerText . "</div>\n\n\t\t\t\t<div class='alert alert-danger'>\n\t\t\t\t\t<h3>A bállítások módosítása közben váratlan hiba lépett fel. Kérjük, próbáld meg később, \n\t\t\t\t\tvagy lépj kapcsolatba velünk az illyes.egyosz+support@gmail.com e-mail címen.</h3>\n\t\t\t\t\t<a href='?adminpage=6' class='btn btn-danger btn-raised'>Vissza</a>\n\t\t\t\t</div>\n\t\t\t\t";
             header("Refresh: 3; url=?adminpage=6");
             exit;
         }
     }
 } else {
     header("Location: logout.php");
     exit;
Esempio n. 18
0
<?php

require "config.php";
require "layout.php";
session_start();
if (isset($_SESSION['login_user'])) {
    header('Location: student-page.php');
    exit;
}
?>
<html>
<head>
<meta charset = "utf-8">
<title>Computer System.</title>
<?php 
res();
?>
	</head>
	<body>

		<?php 
titlepage();
menuTab();
?>

		<div class = "container" >
			<div class= "row blue lighten-5 z-depth-1" align="center">	
			<div class="mycard" align = "center" style="width: 70%;margin-top: 20px;margin-bottom: 20px; border-radius: 50px; boarder: 3px;" >
            
				<div class="row">
					<h2>กรุณาป้อนรหัสประจำตัวและรหัสผ่าน</h2>
Esempio n. 19
0
echo SettingsModel::one('pos_long') ? SettingsModel::one('pos_long') : 0;
?>
;
        </script>

        <script src="<?php 
echo res('assets/js/jquery-2.1.1.js');
?>
"></script>
    </head>
    <body>
        <div class="overlay hidden"></div>
        <div class="overlay2 hidden"></div>
        <div class="overlay3 hidden"></div>
        <header style="background:url('<?php 
echo isset($page->background) && $page->background ? url($page->background->path) : res("assets/img/backgr1.png");
?>
') center ">
            <div class="row1">
                <div class="left">
                    <a href="<?php 
echo Language::url('/');
?>
" class="l_box"><span><?php 
echo str_replace(" ", "</span><span>", SettingsModel::one('sitename_' . Language::ext()));
?>
</span></a>
                    <div class="mini_header">
                        <div class="mh_button"></div>
                        <div class="content hidden">
                            <ul class="m_menu">
Esempio n. 20
0
                foreach ($events[$year][$month][$dayOfMonth] as $event) {
                    ?>
                                                <li><!-- eveniment -->
                                                    <p><?php 
                    echo $event->period;
                    ?>
</p>
                                                    <div class="cl_pop">
                                                        <?php 
                    if (isset($online_persons) && in_array($event->person_id, $online_persons)) {
                        ?>
                                                            <a href="javascript:;" data-personid="<?php 
                        echo $event->person_id;
                        ?>
" class="firechat-start-with"><img src="<?php 
                        echo res('assets/img/startchat.png');
                        ?>
" style="display: inline;" /> <?php 
                        echo varlang('incepe-discutia');
                        ?>
</a>
                                                        <?php 
                    }
                    ?>
                                                        <?php 
                    if ($event->post_id) {
                        ?>
                                                            <a href="<?php 
                        echo Language::url('topost/' . $event->post_id);
                        ?>
"><?php 
Esempio n. 21
0
<?php

require_once "dbconnect.php";
require_once "functions.php";
if (isset($_COOKIE["username"]) and isset($_COOKIE["cookie"])) {
    $username = res($_COOKIE["username"]);
    $cookie = res($_COOKIE["cookie"]);
    // $stmt = $db->prepare("SELECT * FROM students WHERE username = ? ");
    // $stmt->bind_param("s", $username);
    if ($result = $db->query("SELECT * FROM students WHERE username = '******' ")) {
        $user = $result->fetch_assoc();
        if (sha1($user["cookie"]) == $cookie) {
            setcookie("cookie", $cookie, time() + 1800, '/');
            setcookie("username", $username, time() + 1800, '/');
        } else {
            header("Location: logout.php");
            exit;
        }
    } else {
        header("Location: logout.php");
        exit;
    }
} else {
    header("Location: logout.php");
    exit;
}
$result->free();
Esempio n. 22
0
echo varlang('address');
?>
</p>
            <p class="street"><?php 
echo varlang('street');
?>
</p>
            <p class="street"><?php 
echo varlang('city');
?>
</p>
        </div>
        <div class="right map">
            <a href="javascript:window.open('https://www.google.ro/maps/dir//' + loc_lat + ',' + loc_long + '/@' + loc_lat + ',' + loc_long + ',14z');">
                <img src="<?php 
echo res('assets/img/mapitem.png');
?>
" alt="" />
            </a>
        </div>
        <div class="clearfix"></div>
        <p class="form_title"><?php 
echo varlang('scrieti-direct');
?>
</p>
        <div class="contact_top_notif adv" style="display: none;"><?php 
echo varlang('success');
?>
 </div>
        <form id="contact_top_form" action="<?php 
echo url();
Esempio n. 23
0
echo res('assets/img/socicons/share_odno.png');
?>
"  alt="" />
</a>
<a rel="nofollow" target="_blank" href="http://vkontakte.ru/share.php?url=<?php 
echo $link;
?>
">
    <img class="opc-hover" src="<?php 
echo res('assets/img/socicons/share_vk.png');
?>
"  alt="" />
</a>
<a rel="nofollow" target="_blank" href="https://twitter.com/intent/tweet?text=&source=apl&related=apl&via=apl&url=<?php 
echo $link;
?>
">
    <img class="opc-hover" src="<?php 
echo res('assets/img/socicons/share_tw.png');
?>
"  alt="" />
</a>
<a rel="nofollow" target="_blank" href="mailto:?body=<?php 
echo $link;
?>
">
    <img class="opc-hover" src="<?php 
echo res('assets/img/socicons/share_email.png');
?>
" alt="" />
</a>
Esempio n. 24
0
 public function delete_keyword($keyword_id)
 {
     $where = " keyword_id = " . $keyword_id;
     $res = $this->dbm->single_del($this->table, $where);
     if (empty($res['error'])) {
         return res(0);
     }
     return res(100, $res['error']);
 }
Esempio n. 25
0
 public function update_cdata($cate_id, $action = "add")
 {
     if ($action == "add") {
         $sql = " update " . $this->table . " set cdata = `cdata`+1 where cate_id = " . $cate_id;
         $res = $this->dbm->query_update($sql);
     } else {
     }
     if (empty($res['error'])) {
         return res(0, "修改总数成功");
     }
     return res(100, "修改总数失败");
 }
Esempio n. 26
0
<h2><?php 
echo varlang('filemanager');
?>
</h2>

<iframe src="<?php 
echo res('assets/lib/fileman/index.html');
?>
" style="width: 100%;height: 700px;border:0;"></iframe>
Esempio n. 27
0
} else {
    if (isset($_GET["lectureSelect"]) and intval($_GET["lectureSelect"]) < 10 and intval($_GET["lectureSelect"]) > 0) {
        #header starts
        echo $headerText . "<div class='navbar-collapse collapse navbar-warning-collapse'>\r\n\t\t\t\t<ul class='nav navbar-nav navbar-right'>\r\n\t\t\t\t\t<li>\r\n\t\t\t\t\t\t<a href='index.php'>Vissza</a>\r\n\t\t\t\t\t</li>\r\n\t\t\t\t\t<li>\r\n\t\t\t\t\t\t<a href='logout.php'>Kijelentkezés</a>\r\n\t\t\t\t\t</li>\r\n\t\t\t\t</ul>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\r\n\t\t<h2 class='well'>Köszöntünk a honlapon, " . $user["firstName"] . "! Itt tudsz regisztrálni a különböző előadásokra.</h2>";
        #header ends
        #gets the number of the lectures in the chosen timeline as $lectureNumber
        $result = $db->query("SELECT Count(lectures.id) FROM lectures WHERE timelineNumber = " . res($_GET["lectureSelect"])) or die;
        $rows = array();
        while ($row = mysqli_fetch_array($result)) {
            $rows[] = $row;
        }
        $result->free();
        $lectureNumber = $rows[0][0];
        #how many lectures are there in the chosen timeline
        #selects the properties of all lectures in the given as $rows[][]
        $result = $db->query("SELECT * FROM lectures WHERE timelineNumber=" . res($_GET["lectureSelect"])) or die;
        $rows = array();
        while ($row = mysqli_fetch_array($result)) {
            $rows[] = $row;
        }
        $result->free();
        #gets that how many changes the user has as $change
        $result = $db->query("SELECT changes FROM lecregistration WHERE studentId=" . $user["id"]) or die($db->error);
        $changes = array();
        while ($change = mysqli_fetch_array($result)) {
            $changes[] = $change;
        }
        $result->free();
        $change = $changes[0][0];
        echo "\r\n\t\t<div class='panel panel-default panel-body'>\r\n\t\t\tMég {$change} módosítási lehetőséged van hátra.\r\n\t\t</div>\r\n\t";
        #displays all lectures in the given timeline
Esempio n. 28
0
" class="stat_active" alt="" >
            <div class="stat_info">
                <span><?php 
    echo varlang('statut');
    ?>
</span>
                <span><?php 
    echo varlang('consultare-activa');
    ?>
</span>
            </div>
        <?php 
} else {
    ?>
            <img src="<?php 
    echo res('assets/img/stat_enable.png');
    ?>
" class="stat_active" alt="" >
            <div class="stat_info">
                <span><?php 
    echo varlang('statut');
    ?>
</span>
                <span><?php 
    echo varlang('consultare-inchisa');
    ?>
</span>
            </div>
        <?php 
}
?>
Esempio n. 29
0
            ?>
" title="<?php 
            echo $person->first_name;
            ?>
 <?php 
            echo $person->last_name;
            ?>
" src='<?php 
            echo url($person->path);
            ?>
'>
            <?php 
        } else {
            ?>
                <img alt="" src="<?php 
            echo res('assets/img/nophoto.png');
            ?>
">
            <?php 
        }
        ?>
            <div class="sec_label">
                <table>
                    <tr><td><?php 
        echo varlang('name-last-name');
        ?>
:</td><td><p class="sec_name"><?php 
        echo $person->first_name;
        ?>
 <?php 
        echo $person->last_name;
Esempio n. 30
0
header("Expires: 0");
// Proxies.
if (!(include "../../include/cookiecheck.php")) {
    header("Location: ../../logout.php");
    exit;
}
#head section starts
echo "<head>\n\t\t<meta charset='UTF-8' />\n\t\t<title>Egyosznap</title>\n\t\t<link rel='shortcut icon' href='../../style/favicon.ico' />\n\n\t\t<link rel='stylesheet' href='../../bootstrap/css/bootstrap.css'>\n\t\t<link rel='stylesheet' href='../../bootstrap/material/css/material-fullpalette.css'>\n\t\t<link rel='stylesheet' href='../../bootstrap/material/css/ripples.css'>\n\t\t<link rel='stylesheet' href='../../bootstrap/material/css/roboto.css'>\n\t\t<link rel='stylesheet' href='../../style/custom_bootstrap.css'>\n\n\t\t<script type='text/javascript' src='../../js/jquery-2.1.4.min.js'></script>\n\t\t<script type='text/javascript' src='../../js/init.js'></script>\n\t\t<script type='text/javascript' src='../../bootstrap/js/bootstrap.js'></script>\n\t\t<script type='text/javascript' src='../../bootstrap/material/js/material.js'></script>\n\t\t<script type='text/javascript' src='../../bootstrap/material/js/ripples.js'></script>\n\n\t\t<script src='./themeScript.js'></script>\n\t</head>\n\t";
#head section ends
#if the user olny can see all or one class's lecture selections, unauthorized access -> logput.php
if ($user["EGYOSZaccessLevel"] == 2 and $user["accessLevel"] == 3) {
    header("Location: ../../logout.php");
    exit;
}
#defining variables
$lectureId = res($_GET["id"]);
$ifFreeSpace = 0;
#tries to select the chosen lecture from the database
if ($result = $db->query("SELECT id, seats, reserved,timelineNumber FROM lectures WHERE id=" . $lectureId)) {
    #if query was successful --> $rows : the datas of the lecture
    $rows = array();
    while ($row = mysqli_fetch_array($result)) {
        $rows[] = $row;
    }
    $result->free();
    if (empty($rows)) {
        header("Location: ../../index.php");
        exit;
    } else {
        if ($rows[0]["reserved"] < $rows[0]["seats"]) {
            if ($result = $db->query("SELECT L" . $rows[0]["timelineNumber"] . ", changes FROM lecregistration WHERE studentId=" . $user["id"])) {