Ejemplo n.º 1
0
function level_dropdown()
{
    $data[''] = '-Level-';
    $level = level();
    foreach ($level as $r => $val) {
        $data[$r] = $val;
    }
    return $data;
}
Ejemplo n.º 2
0
function makeMonster($level)
{
    $name = array_rand(MONSTERS());
    $monster = MONSTERS()[$name];
    $stats = [];
    foreach ($monster[0] as $val) {
        $sl = level($level * $val);
        $ml = rand(floor($level * $sl * 0.9), ceil($level * $sl * 1.1));
        $ml = max($ml, 1);
        $stats[] = $ml * ($ml + 1) / 2;
    }
    return ["name" => $name, "stats" => $stats];
}
Ejemplo n.º 3
0
 function level(array $array, $parent_id, $level)
 {
     if ($parent_id == $params['parents']) {
         return $level;
     } else {
         foreach ($array as $value) {
             if ($value[id] == $parent_id) {
                 $new_parent_id = $value[parent];
                 $level++;
                 return level($array, $new_parent_id, $level);
             }
         }
     }
 }
Ejemplo n.º 4
0
function level($id, $mysqli, $startVal)
{
    if (!isset($id) && !isset($_GET['parent'])) {
        return 0;
    }
    $query = "SELECT * FROM shop WHERE s_rowID='{$id}'";
    $result = $mysqli->query($query);
    $obj = $result->fetch_object();
    if ($obj->s_parent == 0) {
        return $startVal;
    } else {
        return 1 + level($obj->s_parent, $mysqli, $startVal);
    }
}
Ejemplo n.º 5
0
                 $tpl->parse('list_mm4');
             }
             for ($i = 1940; $i <= 2010; $i++) {
                 $tpl->assign(array('yyyy' => $i, 'my_yyyy' => $i == $birthday['y'] ? 'selected=""' : ''));
                 $tpl->parse('list_yyyy4');
             }
             $class_list = @mysql_query("SELECT * FROM cnt_class ORDER BY id DESC");
             while ($lclass = @mysql_fetch_array($class_list)) {
                 $tpl->assign(array('lclass_id' => $lclass['id'], 'lclass_name' => $lclass['class_name'], 'my_class' => $euser['user_class'] == $lclass['id'] ? 'selected=""' : ''));
                 $tpl->parse('list_class4');
             }
             for ($i = 0; $i <= 9; $i++) {
                 if ($i == 5) {
                     $i = 9;
                 }
                 $tpl->assign(array('level_id' => $i, 'level_name' => level($i), 'my_level' => $i == $euser['user_level'] ? 'selected=""' : ''));
                 $tpl->parse('list_level');
             }
             break;
     }
     break;
 case '12':
     $this_menu = '| Cấu hình';
     switch ($sub_menu) {
         case '0':
             $tpl->assign(array('option_name' => get_option('name'), 'option_email' => get_option('email'), 'option_desc' => get_option('description'), 'option_key' => get_option('keywords'), 'option_paging' => get_option('paging')));
             $this_menu .= ' | Cấu hình chung';
             break;
         case '1':
             $tpl->assign(array('report_check1' => get_option('report') == 1 ? 'checked=""' : '', 'report_check0' => get_option('report') == 0 ? 'checked=""' : '', 'report_info' => get_option('report_info')));
             $this_menu .= ' | Thông báo';
Ejemplo n.º 6
0
 * =========================================================================*
 * Software:					0xBB
 * Software version:			2.0
 * Author:						KinG-InFeT
 * Copyleft:					GNU General Public License              
 * =========================================================================*
 * admin.php                                                        
 ***************************************************************************/
include "kernel.php";
show_header();
show_menu();
list($username, $password) = get_data();
if (!login($username, $password)) {
    die(header('Location: index.php'));
}
if (!(level($username) == 'admin')) {
    die(header('Location: index.php'));
}
csrf_attemp($_SERVER['HTTP_REFERER']);
$usr = $username;
?>
<div class = 'path' id = 'path'>
	<table>
	<?php 
if (empty($_GET['mode'])) {
    ?>
		<tr><td><b><a href = 'index.php'>Home Forum</a></b></td></tr>
	<?php 
} else {
    ?>
		<tr><td><b><a href = 'admin.php'>Home ACP</a></b></td></tr>
Ejemplo n.º 7
0
show_header();
list($username, $password) = get_data();
if (login($username, $password)) {
    _err("Hai gi&agrave; effettuato il login");
}
show_menu();
$error_msg = array();
//inizializzo l'array di errori
if (@$_GET['login'] == 1) {
    $username = clear($_POST['username']);
    $password = $_POST['password'];
    if (empty($username) && empty($password)) {
        $error_msg[] = "<font color=red><p><i>Inserire i dati per il Login!</i><p></font>";
    } elseif (login($username, md5($password)) == FALSE) {
        $error_msg[] = "<font color=red><p><i>Dati inseriti Errati!</i><p></font>";
    } elseif (check_maintenance(2) == 1 && level($username) == 'user') {
        $error_msg[] = "<font color=red><p><i>Login Impossibile (Forum in Modalità Manutenzione)</i><p></font>";
    } elseif (login($username, md5($password)) == TRUE && empty($error_msg)) {
        setcookie("0xBB_user", $username);
        setcookie("0xBB_pass", md5($password));
        //aggiorno l'IP dell'utente nel ban_ip
        mysql_query("UPDATE " . __PREFIX__ . "ban_ip \n\t\t\t\t\t\tSET ip = '" . $_SERVER['REMOTE_ADDR'] . "' \n\t\t\t\t\t  WHERE user_id = '" . nick2uid($username) . "'") or _err(mysql_error());
        header("Location: index.php");
        exit;
    } else {
        $error_msg[] = "<font color=red><p><i>Errore di Login! Riprova</i><p></font>";
    }
}
if ($error_msg) {
    print '<div class="error_msg">
		  <h3 align="center">ERRORI nella fase di LOGIN!</h2><br />
Ejemplo n.º 8
0
function check_commutation($fml, &$commutations)
{
    $op_level = 1;
    $fmls = str_split($fml);
    $len = count($fmls);
    $opts = collect($fmls, $len);
    if ($len == 7 || $len == 9) {
        $op_level = level($opts[0]) * level($opts[1]) * level($opts[2]);
        //echo "op_level:".$op_level."<br>";
        if (!in_array($op_level, $commutations)) {
            $commutations[] = $op_level;
            //print_r($commutations);
            return true;
        } else {
            return false;
        }
    }
    return true;
}
Ejemplo n.º 9
0
 * =========================================================================*
 * viewforum.php                                                        
 ***************************************************************************/
include "kernel.php";
show_header();
show_menu();
list($username, $password) = get_data();
if (!check_forum_id($_GET['id']) || !$_GET['id']) {
    _err("ID non Specificato!");
}
$id = (int) $_GET['id'];
// controllo se il forum è protetto
if (check_access_forum($id) != NULL && check_access_forum($id) != 'user') {
    if (login($username, $password) == TRUE) {
        if (level($username) != 'admin' && level($username) != 'mod') {
            if (level($username) != check_access_forum($id)) {
                _err('Non hai i permessi per visualizzare questo topic!');
            }
        }
    } else {
        if (check_access_forum($id) != NULL && check_access_forum($id) != 'user') {
            header('Location: index.php');
        }
    }
}
if (isset($_GET['page']) && is_numeric($_GET['page']) && (int) $_GET['page'] > 0) {
    $page = (int) $_GET['page'];
} else {
    $page = 1;
}
$query = "SELECT * \n\t\t\t  FROM " . __PREFIX__ . "topic \n\t\t\t WHERE f_id = '" . $id . "' \n\t\t\t   AND replyof < 0 \n\t\t\t ORDER by last DESC";
Ejemplo n.º 10
0
} else {
    ?>
		<tr><td><b><a href = 'pm.php'>Home PM</a></b></td></tr>
	<?php 
}
?>
	</table>
</div>
<br />
<div class = 'pm'>
<?php 
list($username, $password) = get_data();
if (!login($username, $password)) {
    _err("<b>Errore!</b>Devi essere registrato per accedere!");
}
if (level($username) == 'banned') {
    _err("<b>Errore!</b><br /><b><u>" . $username . "</u></b> è stato BANNATO dal forum!");
}
switch (@$_GET['mode']) {
    case 1:
        ?>
		<a href = 'pm.php?mode=3'>[ Nuovo PM ]</a>
		<br /><br />
		<table style="width: 70%;">
			<tr><td align="left" class="users">Oggetto:</td><td align="left" class="users">Da:</td></tr>
		<?php 
        $query = "SELECT * FROM " . __PREFIX__ . "pm WHERE to_usr = '******' ORDER BY ID DESC";
        $res = mysql_query($query) or die(mysql_error());
        while ($row = mysql_fetch_row($res)) {
            if ($row[5]) {
                print "<tr><td align=\"left\" class=\"users\"><b><a href = 'pm.php?mode=2&id=" . $row[0] . "'>" . $row[3] . "</a></b></td><td class=\"users\">" . $row[1] . "</td></tr>";
Ejemplo n.º 11
0
 * =========================================================================*
 * Software:					0xBB
 * Software version:			2.0
 * Author:						KinG-InFeT
 * Copyleft:					GNU General Public License              
 * =========================================================================*
 * modcp.php                                                        
 ***************************************************************************/
include "kernel.php";
show_header();
show_menu();
list($username, $password) = get_data();
if (!login($username, $password)) {
    die(header('Location: index.php'));
}
if (!(level($username) == 'mod')) {
    die(header('Location: index.php'));
}
csrf_attemp($_SERVER['HTTP_REFERER']);
$usr = $username;
?>
<div class = 'path' id = 'path'>
	<table>
	<?php 
if (empty($_GET['mode'])) {
    ?>
		<tr><td><b><a href = 'index.php'>Home Forum</a></b></td></tr>
	<?php 
} else {
    ?>
		<tr><td><b><a href = 'modcp.php'>Home MCP</a></b></td></tr>
Ejemplo n.º 12
0
     //$_SESSION["First_Name"] = $row['First_Name'];
     //$_SESSION["Email"] = $row['Email'];
     //$_SESSION["Password"] = $row['Password'];
     //$_SESSION["Level"] = 'A';
     //echo $_SESSION["Level"];
     //    }
     //}
     $email = $_POST['Email'];
     $password = $_POST['Password'];
     $cat = valid_email($email, $password);
     if (isset($cat)) {
         $_SESSION["First_Name"] = $cat['First_Name'];
         $_SESSION["Email"] = $cat['Email'];
         $_SESSION["Password"] = $cat['Password'];
         $_SESSION["Level"] = $cat['Level'];
         level($cat);
     } else {
         "Not Working";
     }
     break;
 case 'go_to_home':
     if (isset($_SESSION["First_Name"]) && $_SESSION["Level"] == 'A') {
         include 'home_admin.php';
     }
     if (isset($_SESSION["First_Name"]) && $_SESSION["Level"] == 'B') {
         include 'home_admin_B.php';
     }
     if (isset($_SESSION["First_Name"]) && $_SESSION["Level"] == 'M') {
         include 'home_user.php';
     } else {
     }
Ejemplo n.º 13
0
function manage_block_topic($username, $id)
{
    if (level($username) == 'admin' || level($username) == 'mod') {
        $block = check_block_topic($id);
        if ($block == 0) {
            $query = "UPDATE " . __PREFIX__ . "topic SET block = '1' WHERE id = '" . $id . "'";
        } elseif ($block == 1) {
            $query = "UPDATE " . __PREFIX__ . "topic SET block = '0' WHERE id = '" . $id . "'";
        }
        mysql_query($query) or _err(mysql_error());
    } else {
        print "<script>alert(\"Operazione consentita solo ad Amministratori e Moderatori\");</script>";
    }
}
Ejemplo n.º 14
0
                // echo "  \"stack\" => \"" . $stack . "\",\n";
                echo "  \"level\" => \"" . $level . "\",\n";
                echo "  \"label\" => \"" . $desc . "\",\n";
                echo " ],\n";
                $ontology["ops:counter2"] = $counter2;
            }
        }
        // else: old label, old stack -> no new entry
        $ontology["ops:higher"] = $ontology[$stack];
        $ontology["ops:stack"] = $stack;
    }
    return $ontology;
}
echo "<?php\n";
echo "\$array = [\n";
# classifications
$class = mysqli_query("SELECT DISTINCT * FROM target_class");
while ($classRow = mysqli_fetch_assoc($class)) {
    $ontology["ops:higher"] = $root;
    $ontology["ops:stack"] = "";
    $ontology = level($classRow, "l1", $ontology);
    $ontology = level($classRow, "l2", $ontology);
    $ontology = level($classRow, "l3", $ontology);
    $ontology = level($classRow, "l4", $ontology);
    $ontology = level($classRow, "l5", $ontology);
    $ontology = level($classRow, "l6", $ontology);
    $ontology = level($classRow, "l7", $ontology);
    $ontology = level($classRow, "l8", $ontology);
}
echo "];\n";
echo "?>\n";
Ejemplo n.º 15
0
	<thead>
		<th>Username</th>
		<th>Level</th>
		<th>Action</th>
	</thead>
	<tbody>
		<?php 
foreach ($user->result() as $row) {
    ?>
		<tr>
			<td><?php 
    echo $row->username;
    ?>
</td>	
			<td><?php 
    echo level($row->level);
    ?>
</td>
			<td>
					<a class="edit" href="#" data-id="<?php 
    echo $row->username;
    ?>
"> Edit</a>
					<a class="delete" href="#" data-id="<?php 
    echo $row->username;
    ?>
"> Delete</a>
			</td>	
		</tr>
		<?php 
}
Ejemplo n.º 16
0
 ***************************************************************************/
include "kernel.php";
show_header();
show_menu();
list($username, $password) = get_data();
$id = (int) $_GET['id'];
$t_id = (int) $_GET['t_id'];
if (!is_post($id)) {
    _err("ID Inesistente");
}
$query = "SELECT * FROM " . __PREFIX__ . "topic WHERE id = '" . $id . "'";
$data = mysql_fetch_row(mysql_query($query));
if (!login($username, $password)) {
    _err("<b>Errore!</b>Non sei Loggato!");
}
if (!level($username) && $username != $data[2]) {
    _err("Non sei autorizzato a modificare questo topic!");
}
// cancello singolo messaggio
if (@$_GET['delete']) {
    if (@$_GET['confirm'] == 1) {
        $query = "DELETE FROM " . __PREFIX__ . "topic WHERE id = '" . $id . "' OR replyof = '" . $id . "'";
        mysql_query($query) or _err(mysql_error());
        print "<br /><br /><br /><div class=\"success_msg\" align=\"center\">Topic Cancellato con successo<br /><br /><a href='viewtopic.php?id={$t_id}'>Torna al Topic</a></div>";
        header("refresh:3; url=viewtopic.php?id={$t_id}");
        exit;
    }
    print "<script>" . "\n\tif(confirm('Sei sicuro di voler eliminare il topic?') == true) {" . "\n\t\tlocation.href = 'manage.php?delete=1&id=" . clear($_GET['id']) . "&t_id=" . clear($_GET['t_id']) . "&confirm=1'" . "\n\t}else{" . "\n\t\tlocation.href = 'viewtopic.php?id=" . clear($_GET['t_id']) . "'" . "\n\t}" . "\n</script>";
}
if (!empty($_POST['text']) && !empty($_POST['title'])) {
    @($text = clear($_POST['text']));
Ejemplo n.º 17
0
	<body>
			
		<div class="level" style="padding-top:13%;">
		  
		  	<div class="levelcontain">
		     <div id="Textt" style="padding-top: 2%; position:relative;">
			    <center>
				<p style="font-family: 'JLSSpaceGothicR_NC'; font-size: 30px;  padding-right:4%;
				padding-left:4%; align:center;">
				You have successfully deciphered the previous clue.<br><br>
				If you are ready to proceed to the next, go ahead<br><br> </p>
				<p style="font-family: 'JLSSpaceGothicR_NC'; font-size: 30px;  padding-right:4%;
				padding-left:4%; align:center; color:rgb(0, 0, 205);font-size: 30px; cursor:pointer;">
				
				<a href="<?php 
    level();
    ?>
">Proceed</a>  
                </p>
				
                </center> 
			</div>
			<br>
			
		   </div>	
		   <div class="desc">
		   </div>
	    </div>
		
		
	</body>
Ejemplo n.º 18
0
}
if ($_SESSION["user"]) {
    global $high;
    global $middle;
    global $Low;
    $high = 0;
    $middle = 0;
    $Low = 0;
    $query = $db->query("select * from {$tablename} where user='******'");
    $key = 1;
    $re_id = '';
    while ($fs = $db->fetch_array($query)) {
        $url = $fs["url"];
        $time = $fs["exec_time"];
        $id = $fs["report_id"];
        $exp_level = level($id);
        if ($exp_level == 'high') {
            $level_str = "高危";
            $color = "color:red";
        } elseif ($exp_level == "middle") {
            $level_str = "警告";
            $color = "color:blue";
        } elseif ($exp_level == "Low") {
            $level_str = "安全";
            $color = "color:#006400";
        }
        $color_str = "<td align=\"center\" style=\"{$color}\"><font size=\"+1\">{$level_str}</font></td>";
        if ($re_id != $id) {
            $loopstr .= "<tr>\r\n\t\t\t\t\t\t\t<td align=center><span class=\"price\"><font size=\"+1\">{$url}</font><span></td>\r\n\t\t\t\t\t\t\t" . $color_str . "\r\n\t\t\t\t\t\t\t<td align=center>" . ld_select_date($time) . "</td>\r\n\t\t\t\t\t\t\t<td align=center><a href=\"task_list.php?id={$id}\"><font size=\"+1\">查看报告</a></td>";
            $re_id = $id;
        }
Ejemplo n.º 19
0
		<img src="img/05.gif" alt="triste" onclick="document.getElementById('text').value+=' :( '">
		<img src="img/0mg.gif" alt="omg" onclick="document.getElementById('text').value+=' 0mg '">
		<img src="img/04.gif" alt="felice" onclick="document.getElementById('text').value+=' ^_^ '">
		<img src="img/01.jpg" alt="ok" onclick="document.getElementById('text').value+=' ;) '">
		<br />
		<br />
		<form action = 'post.php?id=<?php 
    print $id;
    ?>
' method = 'POST'>
			<p>Titolo: <input name = 'title' type = 'text' style = "width: 50%"><p>
			Messaggio:<br />
			<textarea id='text' name = 'text' class="topic_data"></textarea>
			<br />
		<?php 
    if (level($username) == 'admin' || level($username) == 'mod') {
        ?>
			<br />
			<input type="radio" name="set_topic" value="" checked> Topic Normale
			<input type="radio" name="set_topic" value="announcement"> Setta il topic in forma Annuncio
			<input type="radio" name="set_topic" value="important"> Setta il topic in forma Importante
			<br />
			<br />
		<?php 
    }
    ?>
			<input type = 'submit' value = 'Invia Post'>
		</form>
</div>
</div>
<?php 
Ejemplo n.º 20
0
</span>
        Sauna: <span class="price"><?php 
echo level($arr['Sauna br']);
?>
</span><br />
    <span class="line">Garagem: <span class="price"><?php 
echo level($arr['Parking es']);
?>
</span></span>
      Seguran&ccedil;a 24 horas: 
      <?php 
echo x_or_y($arr['Security 24']);
?>
<br />
  Outros: <span class="price"><?php 
echo level($arr['Others build es']);
?>
</span><br /><br /><br />

<div id="fb-root"></div>
<script>
  window.fbAsyncInit = function() {
    FB.init({appId: 'your app id', status: true, cookie: true,
             xfbml: true});
  };
  (function() {
    var e = document.createElement('script'); e.async = true;
    e.src = document.location.protocol +
      '//connect.facebook.net/en_US/all.js';
    document.getElementById('fb-root').appendChild(e);
  }());
Ejemplo n.º 21
0
        } else {
        }
        $date = $curMonth . $day . $curYear;
        echo $day;
        echo "<br/>";
        get_shifts($date);
        ?>
			</div>
		<?php 
    }
    ?>
	</div>
</div>
<?php 
}
if (level() == 2) {
    ?>
<div class="calendar">
	<div class="daysofweek">
		<?php 
    foreach ($dow as $day) {
        ?>
			<div class="day dow">
				<?php 
        echo $day;
        ?>
			</div>
		<?php 
    }
    ?>
	</div>