コード例 #1
0
ファイル: helpers.php プロジェクト: upfor/upforphp
 /**
  * Log a debug message to the logs.
  *
  * @param  mixed $level
  * @param  mixed $message
  * @param  array $context
  * @return \Upfor\Exception\Logger|null
  */
 function log($level, $message, $context = [])
 {
     if (is_null($message)) {
         return single('logger');
     }
     return single('logger')->log($level, $message, $context);
 }
コード例 #2
0
function vipadd($type, $nick)
{
    if ($type == 0) {
        $group = "bronze";
        $cmd = "pex+user+" . $nick . "+group+add+vip";
    } elseif ($type == 1) {
        $group = "silver";
        $cmd = "pex+user+" . $nick . "+group+add+vipsilver";
    } elseif ($type = 2) {
        $group = "gold";
        $cmd = "pex+user+" . $nick . "+group+add+vipgold";
    }
    single("pvp", $cmd);
    $cmd = "a+OWNER+IMPORTUJI+VIP+" . $cmd;
    single("pvp", $cmd);
}
コード例 #3
0
ファイル: frontend.php プロジェクト: letsdodjango/furasta-org
/**
 * frontend_breadcrumbs
 *
 * returns a page tree with default css formatting 
 * 
 * @access public
 * @return void
 */
function frontend_breadcrumbs($params)
{
    global $SETTINGS;
    $page = @$_GET['page'];
    $array = explode('/', $page);
    if (end($array) == '') {
        array_pop($array);
    }
    if (count($array) == 0) {
        $home = single('select slug from ' . DB_PAGES . ' where home=1 limit 1', 'slug');
        $array[0] = $home;
    }
    $seperator = isset($params['seperator']) ? $params['seperator'] : ' > ';
    /**
     * create breadcrumbs array in form $name => $url
     */
    $breadcrumbs = array();
    for ($i = 0; $i < count($array); $i++) {
        $name = str_replace('-', ' ', $array[$i]);
        $url = SITE_URL;
        for ($n = 0; $n < $i + 1; $n++) {
            $url .= $array[$n] . '/';
        }
        $breadcrumbs[$name] = $url;
    }
    /**
     * filter breadcrumbs array through plugins
     */
    $Plugins = Plugins::getInstance();
    $breadcrumbs = $Plugins->filter('frontend', 'filter_breadcrumbs', $breadcrumbs);
    /**
     * generate html
     */
    $content = '<ul id="page-tree" style="list-style-type:none">
			<li style="display:inline"><a href="' . SITE_URL . '">' . $SETTINGS['site_title'] . '</a></li>';
    $i = 0;
    foreach ($breadcrumbs as $name => $url) {
        $name = $i + 1 == count($array) ? '<b>' . $name . '</b>' : $name;
        $content .= '<li style="display:inline">' . $seperator . '<a href="' . $url . '">' . $name . '</a></li>';
        ++$i;
    }
    $content .= '</ul>';
    return $content;
}
コード例 #4
0
ファイル: system.php プロジェクト: letsdodjango/furasta-org
/**
 * maintenance_message
 *
 * displays the maintenance mode error
 *
 * @return void
 */
function maintenance_message()
{
    $message = single('select value from ' . DB_OPTIONS . ' where category="configuration_page_options" and name="maintenance_message"', 'value');
    if (empty($message)) {
        global $SETTINGS;
        $message = $SETTINGS['site_title'] . ' is currently undergoing maintenance. Please try again later.';
    }
    error($message, '');
}
コード例 #5
0
			<br style="clear:both"/>
			<table>
				<tr>
					<th>' . $Template->e('title') . '</th>
					<th>' . $Template->e('date') . '</th>
					<th>' . $Template->e('user') . '</th>
					<th>' . $Template->e('delete') . '</th>
				</tr>';
if (count($Posts) == 0) {
    $content .= '<tr>
						<td colspan="4" id="empty"><p><i>No blog posts yet!</i></p></td>
					</tr>';
} else {
    foreach ($Posts as $post) {
        $link = '<a href="plugin.php?p_name=Blog&blog_id=' . $Page['id'] . '&post=' . $post['id'] . '" class="list-link">';
        $user = single('select name from ' . DB_USERS . ' where id=' . $post['user'], 'name');
        $content .= '<tr>
							<td>' . $link . $post['title'] . '</a></td>
							<td>' . $link . date("d/m/y", strtotime($post['post_date'])) . '</a></td>
							<td>' . $link . $user . '</a></td>
							<td>
								<a class="link delete" id="' . $post['id'] . '">
									<span id="delete-img" class="admin-menu-img">&nbsp;</span>
								</a>
							</td>
						</tr>';
    }
}
$content .= '
				<tr>
					<th colspan="4">&nbsp;</th>
コード例 #6
0
<?php

include "../config.php";
include "../functions.php";
$server = $_GET["server"];
$array = array("192.168.1.10", "192.168.1.91", "192.168.1.99", "192.168.1.100", "195.47.87.173", "195.47.87.175", "localhost", "127.0.0.1");
$ip = $_SERVER['REMOTE_ADDR'];
if (in_array($ip, $array)) {
    $mysqli->select_db("mcusers");
    $request = "SELECT * FROM  `automessanger` WHERE  `server` LIKE  '{$server}'";
    $result = $mysqli->query($request);
    while ($row = $result->fetch_array(MYSQLI_NUM)) {
        $prefix = $row[2];
        $message = $row[3];
        $message = str_replace(" ", "-", $message);
        $prefix = str_replace(" ", "-", $prefix);
        $message = str_replace("&", "_", $message);
        $prefix = str_replace("&", "_", $prefix);
        $message = "unitesay+" . $prefix . "+" . $message;
        single($server, $message);
        sleep(20);
    }
} else {
    exit;
}
コード例 #7
0
ファイル: items.php プロジェクト: letsdodjango/furasta-org
 * switches between the possible values of
 * $overview_item and echos the content of the
 * associated item. the default switch checks
 * plugins and if it exists in a plugin it also
 * echos the content. 
 */
switch ($overview_item) {
    case 'website-overview':
        require_once HOME . '_inc/function/admin.php';
        $template = parse_template_file(TEMPLATE_DIR . 'style.css');
        $content .= '
		<table class="row-color">
		        <tr><td>' . $Template->e('pages') . ':</td><td>' . single('select count(id) from ' . DB_PAGES, 'count(id)') . '</td></tr>
		        <tr><td>' . $Template->e('trash') . ':</td><td>' . single('select count(id) from ' . DB_TRASH, 'count(id)') . '</td></tr>
		        <tr><td>' . $Template->e('users') . ':</td><td>' . single('select count(id) from ' . DB_USERS, 'count(id)') . '</td></tr>
			<tr><td>' . $Template->e('groups') . ':</td><td>' . single('select count(id) from ' . DB_GROUPS, 'count(id)') . '</td></tr>
		        <tr><td>' . $Template->e('template') . ':</td><td>' . $template['Name'] . '</td></tr>
		        <tr><td>Furasta.Org ' . $Template->e('version') . ':</td><td>' . VERSION . '</td></tr>
		</table>';
        break;
    case 'recently-edited':
        $content .= '<table class="row-color">';
        $pages = rows('select id,name,content,edited,perm from ' . DB_PAGES . ' order by edited desc limit 5');
        if (count($pages) == 0) {
            $content .= '<p><i>No items recently edited!</i></p>';
            break;
        }
        foreach ($pages as $page) {
            /**
             * get admin perm from page perm string
             * perm rules are in _inc/class/User.php
コード例 #8
0
 *
 * @author     Conor Mac Aoidh <*****@*****.**>
 * @license    http://furasta.org/licence.txt The BSD License
 * @version    1.0
 * @package    admin_pages
 */
/**
 * make sure ajax script was loaded and user is
 * logged in 
 */
if (!defined('AJAX_LOADED') || !defined('AJAX_VERIFIED')) {
    die;
}
if ((int) @$_GET['id'] != 0) {
    $id = $_GET['id'];
    $perms = single('select perm from ' . DB_PAGES . ' where id=' . $id, 'perm');
    $perms = explode('|', $perms);
    if (isset($perms[0]) && !empty($perms[0])) {
        if (strpos($perms[0], "#") !== false) {
            $see = explode('#', $perms[0]);
            /**
             *  users and groups arrays
             */
            $see_users = explode(',', $see[0]);
            $see_groups = explode(',', $see[1]);
        } else {
            $see_users = explode(',', $perms[0]);
        }
    }
    if (isset($perms[1]) && !empty($perms[1])) {
        if (strpos($perms[1], "#") !== false) {
コード例 #9
0
ファイル: delete.php プロジェクト: letsdodjango/furasta-org
 * @license    http://furasta.org/licence.txt The BSD License
 * @version    1.0
 * @package    admin_pages
 */
/**
 * make sure ajax script was loaded and user is
 * logged in 
 */
if (!defined('AJAX_LOADED') || !defined('AJAX_VERIFIED')) {
    die;
}
/**
 * check if user has permission to delete pages
 */
if (!$User->hasPerm('d')) {
    die('perm');
}
$id = addslashes(@$_GET['id']);
if ($id == '') {
    exit;
}
$parent = single('select parent from ' . DB_PAGES . ' where id=' . $id, 'parent');
$children = rows('select id from ' . DB_PAGES . ' where parent=' . $id);
if (count($children) != 0) {
    foreach ($children as $child) {
        query('update ' . DB_PAGES . ' set parent=' . $parent . ' where id=' . $child['id']);
    }
}
query('insert into ' . DB_TRASH . ' select NULL,name,content,slug,template,type,edited,user,position,parent,perm,home,display from ' . DB_PAGES . ' where id=' . $id);
query('delete from ' . DB_PAGES . ' where id=' . $id);
cache_clear('DB_PAGES');
コード例 #10
0
$job = $_POST['jobs'];
switch ($action) {
    case 0:
        single("survival", "jobs+fire+{$nick}+{$job}");
        single("survival", "a+Hrac+{$nick}+byl+vyhozen+z+firmy+{$job}");
        break;
    case 1:
        single("survival", "jobs+demote+{$nick}+{$job}+1");
        single("survival", "a+Hraci+{$nick}+byl+z+firmy+{$job}+odebran+1+level");
        break;
    case 2:
        single("survival", "jobs+promote+{$nick}+{$job}+1");
        single("survival", "a+Hraci+{$nick}+byl+z+firmy+{$job}+pridan+1+level");
        break;
    case 3:
    case 4:
        $mysqli->select_db("mcsurvival");
        $request = "SELECT * FROM  `jobs` WHERE  `job` LIKE  '{$job}' ORDER BY `level` DESC";
        $result = $mysqli->query($request);
        while ($row = $result->fetch_array(MYSQLI_NUM)) {
            $level = $row[2];
            $nick = $row[0];
            $base = 100;
            $money = round(1000 + $level * $base);
            single("survival", "tell+{$nick}+Za+praci+ve+firme+si+dostal+castku+{$money}+leveluj+dal+a+dostanes+jeste+vic!+:)");
            single("survival", "eco+give+{$nick}+{$money}");
            single("survival", "a+Hraci+{$nick}+byla+vyplacena+castka:+{$money}");
            sleep(1);
        }
}
echo "<script>window.close();</script>";
コード例 #11
0
require '../phpfiles/singlefunction.php';
$olnumbering = $start + 1;
echo "<ol type='1' start=\"{$olnumbering}\">";
$row = mysqli_fetch_assoc($result);
for ($i = $olnumbering; $i <= $row['exa_nom']; $i++) {
    echo '<li>';
    multiple($olnumbering);
    echo '</li>';
}
echo "</ol>";
$total = $row['exa_nos'] + $row['exa_nom'];
if ($olnumbering > $row['exa_nom']) {
    echo "<ol type='1' start=\"{$olnumbering}\">";
    for ($i = $olnumbering; $i <= $total; $i++) {
        echo '<li>';
        single($olnumbering);
        echo '</li>';
    }
    echo "</ol>";
}
?>

                
                
                
<?php 
//include('config.php');
//Calculating no of pages
require '../mysqlcon.php';
$sql = "select que_id from questionss where que_exam_id={$examid} union all select quem_id from questionsm where quem_exam_id={$examid}";
$result = mysqli_query($conn, $sql);
コード例 #12
0
ファイル: index.php プロジェクト: letsdodjango/furasta-org
 */
$User = User::getInstance();
$login = User::verify();
if ($SETTINGS['maintenance'] == 1 && !$login) {
    maintenance_message();
}
$page = @$_GET['page'];
if (empty($page)) {
    $id = single('select id from ' . DB_PAGES . ' where home=1 limit 1', 'id');
} else {
    $array = explode('/', $page);
    if (end($array) == '') {
        array_pop($array);
    }
    $slug = addslashes(end($array));
    $id = single('select id from ' . DB_PAGES . ' where slug="' . $slug . '"', 'id');
    if (!$id) {
        frontend_error('<h1>404 - File Not Found</h1><p>The page your are looking for does not ' . 'exist</p><p><a href="' . SITE_URL . '">Site Index</a></p>', '404 - File Not Found');
    }
}
/**
 * get page rows in array and stripslashes 
 */
$Page = row('select * from ' . DB_PAGES . ' where id=' . $id, true);
$Page = stripslashes_array($Page);
// make sure user has permission to view page
$perm = explode('|', $Page['perm']);
if ($User && !$User->frontendPagePerm($perm[0])) {
    frontend_error('<h1>Permissions Error</h1><p>You have insufficient privellages to view this page.</p>', 'Permissions Error');
}
require HOME . '_inc/smarty.php';
コード例 #13
0
ファイル: answerexam.php プロジェクト: haithamsaadoon/el
$result = mysqli_query($conn, $sql);
$nosindex = 1;
echo "<ol type='1' >";
while ($row = mysqli_fetch_assoc($result)) {
    echo '<li>';
    multiple($row);
    echo '</li>';
    $nosindex++;
}
echo "</ol>";
$sql = "select * from questionss where que_exam_id={$examid}";
$result = mysqli_query($conn, $sql);
echo "<ol type='1' start=\"{$nosindex}\">";
while ($row = mysqli_fetch_assoc($result)) {
    echo '<li>';
    single($row);
    echo '</li>';
}
echo "</ol>";
?>
                            
                    <input  type="submit" value="ادخل الاجابات">
                </form>
                    
                    
                    
                    
                </div><!-- of the jwplayer col-->
               
            </div><!-- end of the main content row-->
            
コード例 #14
0
ファイル: query.php プロジェクト: Beertie/web_scraper
function make_regexp($query)
{
    /*
     * De 1e stap is tellen hoeveek er haakje svoor komen
     */
    if (substr_count($query, '*') >= 1) {
        return false;
    }
    //Tel alle openingshaakjes
    $count_open = substr_count($query, '(');
    //Tel aale sluithaakjes
    $count_close = substr_count($query, ')');
    //Als er het aantal haakjes niet gelijk is sluit gelijk alles
    if ($count_close !== $count_open) {
        return false;
    }
    if ($count_open == 1) {
        if (substr($query, -1) == ')' and substr($query, 0, 1) == '(') {
            $count_open = 0;
        }
    }
    //Hier gaan we opdelen in geen haakjes of 1 paar haakjes of meerder haakjes
    //Als er geen haakjes zijn gevonden
    if ($count_open == 0) {
        //Tel nu hoe vaak het woordt AND voor komt
        $count_and = substr_count($query, 'AND');
        if ($count_and == 0) {
            //Als er geen AND in voor komt gaat er iets mis
            return single($query);
            //Als er 1x and in voor komt
        } elseif ($count_and == 1) {
            //Als er And voor kom zet dan alles keys om en een regexp
            return get_title_key($query);
            //Als er meer dan 1 AND in voor komt
        } else {
            //Er komen nu geen haakjes voor maar wel dan 1 x AND
            return no_end_more_and($query);
        }
        //Als er 1 paar haakjes voor komt
    } elseif ($count_open == 1) {
        //Tel hoe vaak komt AND voor
        $count_and = substr_count($query, 'AND');
        //Als het 1x voor komt
        if ($count_and == 1) {
            //Haal op wat voor de AND staat
            $befor = strstr($query, 'AND', true);
            if (substr_count($befor, ')')) {
                //De haakjes staan voor de AND
                return single_par_before($query);
            } else {
                //De haakjes staam ma de AND
                return single_par_after($query);
            }
            //Als het meer dan 1 x voor komt
        } else {
            //Ga kijken of de AND tussen de haakjes staat of er na komet
            $substring = getInnerSubstring($query, "AND");
            $count = substr_count($substring, ')');
            //De and staat tussen haakjes
            if ($count == 1) {
                //De haakjes staan voor de and en er staan een sand tussen
                return single_par_before_more_and($query);
                //De and komt na de haakjes
            } else {
                //De haakjes staam ma de AND
                return single_par_after($query);
            }
        }
        //Als er meer haakje svoor komen
    } else {
        //Er zijn meer haakjes
        return multi_par($query);
    }
}
コード例 #15
0
ファイル: addquestions.php プロジェクト: haithamsaadoon/el
require '../phpfiles/multiplefunction.php';
require '../phpfiles/singlefunction.php';
// $olnumbering=$start+1;
echo "<ol type='1' >";
$row = mysqli_fetch_assoc($result);
for ($i = 1; $i <= $row['exa_nom']; $i++) {
    echo '<li>';
    multiple($i);
    echo '</li>';
}
echo "</ol>";
$nosindex = $row['exa_nom'] + 1;
echo "<ol type='1' start=\"{$nosindex}\">";
for ($i = 1; $i <= $row['exa_nos']; $i++) {
    echo '<li>';
    single($i);
    echo '</li>';
}
echo "</ol>";
?>
                    <input  type="submit" value="ادخل الاسئلة">
                </form>
                
                

              
               

            </div>
            <!-- /.container-fluid -->
コード例 #16
0
								<input type="hidden" name="test_count" value="<?php 
    print $t;
    ?>
" />            
								<br/><br/><br/> <button type="submit" class="btn btn-primary">Додати</button>
										</div>
						</div>
				</form>
						<?php 
}
?>
		<?php 
if ($e == 'many') {
    multiple($e, $t, $t_id);
} elseif ($e == 'one') {
    single($e, $t, $t_id);
} elseif ($e == 'yn') {
    yn($e, 2, $t_id);
} elseif ($e == 'text') {
    text($e, $t_id);
} elseif ($e == 'order') {
    order($e, $t, $t_id);
}
?>
		
        <div class="col-xs-9 col-sm-8 col-md-6 col-lg-4 col-xs-offset-3 col-sm-offset-2 col-md-offset-2 col-lg-offset-2">
            <a href="<?php 
print URL;
?>
?c=manageTests&f=create_question_hand">назад</a>
        </div>
コード例 #17
0
 * password reset details to the user.
 *
 * @author     Conor Mac Aoidh <*****@*****.**>
 * @license    http://furasta.org/licence.txt The BSD License
 * @version    1.0
 * @package    admin_users
 */
$email = addslashes(@$_GET['email']);
if ($email == '') {
    die('1');
}
$query = mysql_query('select * from ' . DB_USERS . ' where email="' . $email . '"');
$num = mysql_num_rows($query);
if ($num == 1) {
    die('0');
} else {
    $hash = md5(mt_rand());
    query('update ' . DB_USERS . ' set reminder="' . $hash . '" where email="' . $email . '"');
    $name = single('select name from ' . DB_USERS . ' where email="' . $email . '" and hash="' . $hash . '"', 'name');
    $subject = 'Password Reminder | Furasta.Org';
    $message = $name . ',
		<br/>
		<p>You have requested a new password. Please follow the link below to reset your password:</p>
		<br/>
		<p>' . SITE_URL . '/admin/settings/users/reset_password.php?reminder=' . $hash . '</p>
		<br/>
		<p>If you have not requested a new password please ignore this email.</p>
	';
    email($email, $subject, $message);
    die('1');
}
コード例 #18
0
ファイル: index.php プロジェクト: letsdodjango/furasta-org
<?php

/**
 * Blog Plugin, Furasta.Org
 *
 * @author	Conor Mac Aoidh <*****@*****.**>
 * @licence	http://furasta.org/licence.txt The BSD Licence
 * @version	1
 */
$qstring = @$_GET['blog_post'];
switch ($qstring) {
    case strpos($qstring, '/') !== -1:
        $qstring = explode('/', rtrim($qstring, '/'));
        // assume its a post title for now
        $name = addslashes(str_replace('-', ' ', $qstring[count($qstring) - 1]));
        $post_id = single('select id from ' . DB_PREFIX . 'blog_posts where title="' . $name . '"', 'id');
        if ($post_id) {
            require HOME . '_plugins/Blog/frontend/post.php';
        } else {
            // get date from qstring if present
            $date = array();
            for ($i = 0; $i < 3; ++$i) {
                if (isset($qstring[$i])) {
                    array_push($date, $qstring[$i]);
                }
            }
            if (count($date) == 0) {
                $date = false;
            }
            require HOME . '_plugins/Blog/frontend/posts.php';
        }
コード例 #19
0
ファイル: index.php プロジェクト: letsdodjango/furasta-org
			</a>
			<br style="clear:both"/>
			<table class="row-color" id="forums">
				<tr class="th">
					<th>' . $Template->e('name') . '</th>
					<th>' . $Template->e('forum_description') . '</th>
					<th>' . $Template->e('forum_posts_count') . '</th>
					<th>' . $Template->e('delete') . '</th>
				</tr>
	';
$forums = rows('select id, name, description from ' . DB_PREFIX . 'forums');
if (count($forums) == 0) {
    $content .= '<tr class="empty-table"><td colspan="4">No forums yet! <a class="link add-forum">Add one</a>.</td></tr>';
}
foreach ($forums as $forum) {
    $posts = single('select count(id) from ' . DB_PREFIX . 'forum_posts where id=' . $forum['id'], 'count(id)');
    $content .= '<tr>
		<td>' . $forum['name'] . '</td>
		<td>' . $forum['description'] . '</td>
		<td>' . $posts . '</td>
		<td><a class="link delete" id="' . $forum['id'] . '"><span id="delete-img" class="admin-menu-img">&nbsp;</span></a></td>
	</tr>';
}
$content .= '
				<tr class="th">
					<td colspan="4">&nbsp;</td>
				</tr>
			</table>
		</div>
	</div>
	<div id="tabs-3">
コード例 #20
0
ファイル: post.php プロジェクト: letsdodjango/furasta-org
<?php

/**
 * Blog Plugin, Furasta.Org
 *
 * @author	Conor Mac Aoidh <*****@*****.**>
 * @licence	http://furasta.org/licence.txt The BSD Licence
 * @version	1
 */
$Template = Template::getInstance();
$options = options('page_' . $id);
$limit = @$options['blog_items_per_page'] == 0 ? 5 : $options['blog_items_per_page'];
$post = row('select * from ' . DB_PREFIX . 'blog_posts where id=' . $post_id);
echo '<div id="blog-content">';
$b_name = single('select slug from ' . DB_PAGES . ' where id=' . $id, 'slug');
$time = strtotime($post['post_date']);
$date = date('/Y/m/d/', $time);
$show_date = date('F j, Y', $time);
$name = str_replace(' ', '-', $post['title']);
$link = '<a href="' . SITE_URL . $b_name . $date . $name . '">';
$content = @$options['blog_full_summary'] == 'full' ? $post['body'] : substr($post['body'], 0, 400) . ' [..]';
echo '<div class="blog-post" id="blog_post_' . $post['id'] . '">';
echo '<div class="blog-post-title">
	' . $link . '<h1>' . $post['title'] . '</h1></a>
	<p class="post_date">' . $show_date . '</p>
</div>';
echo '<div class="blog-post-content">' . $content . '</div>';
echo '<div class="blog-post-footer">';
echo '<p id="post_tags">Tags: ' . $post['tags'] . '</p>';
echo '</div></div>';
echo '</div>';
コード例 #21
0
ファイル: edit.php プロジェクト: olehpitsun/duplom.comv2.2.1
    print $question_id;
    ?>
" />
								<br/><br/><br/> <button type="submit" class="btn btn-primary">Додати</button>
										</div>
						</div>
				</form>
						<?php 
}
?>
            <?php 
$test_type = $data[0]['test_type'];
if ($test_type == 'many') {
    multiple($test_type, $t_id, $question_id, $data);
} elseif ($test_type == 'one') {
    single($test_type, $t_id, $question_id, $data);
} elseif ($test_type == 'yn') {
    yn($test_type, 2, $t_id, $question_id, $data);
} elseif ($test_type == 'text') {
    text($test_type, $t_id, $question_id, $data);
} elseif ($test_type == 'order') {
    order($test_type, $t_id, $question_id, $data);
}
?>
            <div class="col-xs-9 col-sm-8 col-md-6 col-lg-4 col-xs-offset-3 col-sm-offset-2 col-md-offset-2 col-lg-offset-2">
                <a href="<?php 
print URL;
?>
?c=manageTests&f=create_question_hand">назад</a>
            </div>
        </div></div></div>
コード例 #22
0
function redeemMark($uId, $qId, $mysqli)
{
    $date = time();
    $query = "UPDATE  `completed_quests` SET  `redeemStatus` =  '1',`adminId` = NULL ,`timeChecked` = {$date} WHERE  `completed_quests`.`playerId` ={$uId} AND `completed_quests`.`questId` ={$qId} AND `completed_quests`.`status` = 1 ";
    $mysqli->query($query);
    //echo $query;
    if (mysqli_affected_rows($mysqli) != 0) {
        single("survival", getQuestCmd($qId, "redeem", $mysqli));
        whole(getQuestCmd($qId, "complete", $mysqli));
    }
}
コード例 #23
0
    whole($cmd);
    $cmd = "unban+" . $nick;
    whole($cmd);
    $cmd = "pardon+" . $nick;
    whole($cmd);
    $cmd = "pardonip+" . $nick;
    whole($cmd);
    $cmd = "say+Unban+proveden:+" . $nick;
    whole($cmd);
} elseif ($price == 99.0) {
    $duration = 1209600;
    $cmd = "pex+user+" . $nick . "+group+add+vipgold";
    whole($cmd);
    $cmd = "eco+give+" . $nick . "+5000";
    single("survival", $cmd);
    single("pvp", $cmd);
    $cmd = "kit+viponce+" . $nick;
    whole($cmd);
    $res = $mysqli->query("SELECT * FROM  `mcsms`.`mccheck` WHERE  `text` LIKE  '{$text}' AND  `type` LIKE  '2'");
    $row = $res->fetch_assoc();
    $textc = $row['text'];
    if (isset($textc)) {
        $duration = $row['duration'] + $duration;
        $idu = $row['id'];
        $mysqli->query("UPDATE  `mcsms`.`mccheck` SET  `duration` =  '{$duration}' WHERE  `mccheck`.`id` = {$idu}");
        $mysqli->query("UPDATE `mcsms`.`mccheck` SET `deleted` = '0' WHERE `mccheck`.`id` = {$idu}");
        $mysqli->query("UPDATE `mcsms`.`mccheck` SET `price` = '{$price}' WHERE `mccheck`.`id` = {$idu}");
        $mysqli->query("UPDATE `mcsms`.`mccheck` SET `date` = '{$date}' WHERE `mccheck`.`id` = {$idu}");
        $mysqli->query("UPDATE `mcsms`.`mccheck` SET `operator` = '{$operator}' WHERE `mccheck`.`id` = {$idu}");
        $mysqli->query("UPDATE `mcsms`.`mccheck` SET `att` = '{$att}' WHERE `mccheck`.`id` = {$idu}");
        $mysqli->query("UPDATE `mcsms`.`mccheck` SET `msisdn_gw` = '{$msisdn_gw}' WHERE `mccheck`.`id` = {$idu}");
コード例 #24
0
ファイル: type.php プロジェクト: letsdodjango/furasta-org
 */
if (!defined('AJAX_LOADED') || !defined('AJAX_VERIFIED')) {
    die;
}
require HOME . '_inc/function/admin.php';
/**
 * set up $_GET variables 
 */
$type = @$_GET['type'];
$id = (int) @$_GET['id'];
$normal = true;
if ($type != 'Normal') {
    $normal = $Plugins->adminPageType($type, $id);
}
if ($type == 'Normal' || !$normal) {
    if ($id != 0) {
        $content = stripslashes(single('select content from ' . DB_PAGES . ' where id= ' . $id, 'content'));
    }
    $Template = Template::getInstance();
    $javascript = '
	$(function(){
		tinymce_changeConfig( "#page-content", "Normal" );
	});';
    $Template->loadJavascript('FURASTA_ADMIN_DB_PAGES' . $id, $javascript);
    $content = '
	<textarea id="page-content" name="PageContent" class="tinymce" style="width:100%;display:block">
		' . @$content . '
	</textarea>';
    $Template->add('content', $content);
} else {
}