• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP is_connected函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中is_connected函数的典型用法代码示例。如果您正苦于以下问题:PHP is_connected函数的具体用法?PHP is_connected怎么用?PHP is_connected使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了is_connected函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: get_exchange_rates

 public function get_exchange_rates()
 {
     //		\Cache::forget('money_exchange_rates');
     if (\Cache::has('money_exchange_rates')) {
         $data = \Cache::get('money_exchange_rates');
     } elseif (is_connected("openexchangerates.org")) {
         $api_key = "bbc128aa6f3645d78b098f0eef3dd533";
         $json = file_get_contents("http://openexchangerates.org/api/latest.json?app_id={$api_key}");
         $json = json_decode($json, true);
         $data['rates'] = $json['rates'];
         $data['base'] = $json['base'];
         // $data['json_rates'] = json_encode($json['rates']);
         \Cache::add('money_exchange_rates', $data, 360);
         \Cache::add('money_exchange_rates_default', $data, 50000);
     } else {
         $data = \Cache::get('money_exchange_rates_default');
     }
     $currency_list = \Lst::common('currency1');
     $arr["site_name"] = "Ahmed-Badawy.com";
     $arr["base"] = $data['base'];
     foreach ($currency_list as $key => $val) {
         $n = ['short' => $key, "name" => $val, "value" => $data['rates'][$key]];
         $arr['rates'][$key] = $n;
     }
     return $arr;
 }
开发者ID:Ahmed-Badawy,项目名称:ahmed-badawy.com-Website,代码行数:26,代码来源:ProjectsController.php


示例2: printNews

function printNews($side)
{
    $pos = zp_filter_slot('admin_overview', 'comment_form_print10Most') !== false;
    if ($pos && $side == 'left' || !$pos && $side == 'right') {
        if ($connected = is_connected()) {
            require_once dirname(__FILE__) . '/zenphoto_news/rsslib.php';
        }
        ?>
		<div class="box" id="overview-news">
		<h2 class="h2_bordered"><?php 
        echo gettext("News from Zenphoto.org");
        ?>
</h2>
		<?php 
        if ($connected) {
            echo RSS_Display("http://www.zenphoto.org/index.php?rss-news&withimages", 5);
        } else {
            ?>
			<ul>
				<li><?php 
            echo gettext('A connection to <em>Zenphoto.org</em> could not be established.');
            ?>
				</li>
			</ul>
			<?php 
        }
        ?>
		</div>
		<?php 
    }
    return $side;
}
开发者ID:hatone,项目名称:zenphoto-1.4.1.4,代码行数:32,代码来源:zenphoto_news.php


示例3: index

 public function index()
 {
     $data = array();
     $data['title'] = $this->lang->line('home');
     $this->load->model('message_model');
     if (!is_connected()) {
         $language = $this->config->item('language');
     } else {
         $language = $this->session->userdata['user']->language;
     }
     $data['home_message'] = $this->message_model->get_message('home-message');
     if ($data['home_message'] !== '') {
         $data['home_message'] = $data['home_message'][0]->{$language . '_content'};
     }
     $data['home_message'] = html_entity_decode($data['home_message']);
     $data['yesterday_matches'] = matches_of_day(date('d/m/Y', time() - 60 * 60 * 24));
     $data['today_matches'] = matches_of_day();
     $data['tomorrow_matches'] = matches_of_day(date('d/m/Y', time() + 60 * 60 * 24));
     if (!$data['yesterday_matches'] && !$data['today_matches'] && !$data['tomorrow_matches']) {
         $data['last_matches'] = last_matches();
         $data['next_matches'] = next_matches();
     }
     $this->load->view('templates/header', $data);
     $this->load->view('templates/nav', $data);
     $this->load->view('index', $data);
     $this->load->view('templates/footer', $data);
 }
开发者ID:sbrodin,项目名称:12parfait,代码行数:27,代码来源:Home.php


示例4: pics

function pics($post, $connect)
{
    if ($post['bool'] === "false") {
        $sql = "SELECT * FROM pics ORDER BY id DESC LIMIT " . intval($post['nbr']) . ", 2";
        $result = $connect->query($sql);
        $fetch1['data'] = $result->fetchAll(PDO::FETCH_ASSOC);
        foreach ($fetch1['data'] as $key => $value) {
            $sql = "SELECT COUNT(*) AS 'count' FROM likes WHERE pic='" . $value['id'] . "'";
            $result = $connect->query($sql);
            $fetch2 = $result->fetch(PDO::FETCH_ASSOC);
            $fetch1['data'][$key]['likes'] = $fetch2['count'];
            if (is_connected()) {
                $sql = "SELECT * FROM likes WHERE pic='" . intval($value['id']) . "' AND user='" . htmlspecialchars($_SESSION['user']) . "'";
                $result = $connect->query($sql);
                if ($result->fetch()) {
                    $fetch1['data'][$key]['islike'] = 1;
                } else {
                    $fetch1['data'][$key]['islike'] = 0;
                }
            }
            $sql = "SELECT user, comment FROM comments WHERE pic='" . $value['id'] . "' ORDER BY id ASC";
            $result = $connect->query($sql);
            $fetch3 = $result->fetchAll(PDO::FETCH_ASSOC);
            $fetch1['data'][$key]['comments'] = $fetch3;
        }
        $fetch1['end'] = true;
        $res = json_encode($fetch1);
        return $res;
    } else {
        $sql = "SELECT * FROM pics WHERE id='" . intval($post['nbr']) . "'";
        $result = $connect->query($sql);
        if ($result->rowCount() > 0) {
            $fetch1 = $result->fetch(PDO::FETCH_ASSOC);
            $sql = "SELECT COUNT(*) AS 'count' FROM likes WHERE pic='" . intval($fetch1['id']) . "'";
            $result = $connect->query($sql);
            $fetch2 = $result->fetch(PDO::FETCH_ASSOC);
            $fetch1['likes'] = $fetch2['count'];
            if (is_connected()) {
                $sql = "SELECT * FROM likes WHERE pic='" . intval($fetch1['id']) . "' AND user='" . htmlspecialchars($_SESSION['user']) . "'";
                $result = $connect->query($sql);
                if ($result->fetch()) {
                    $fetch1['islike'] = 1;
                } else {
                    $fetch1['islike'] = 0;
                }
            }
            $sql = "SELECT user, comment FROM comments WHERE pic='" . intval($fetch1['id']) . "' ORDER BY id ASC";
            $result = $connect->query($sql);
            $fetch3 = $result->fetchAll(PDO::FETCH_ASSOC);
            $fetch1['comments'] = $fetch3;
            $fetch1['end'] = true;
            $res = json_encode($fetch1);
            return $res;
        } else {
            $res['end'] = false;
            $res['info'] = "Cette photo n'existe pas.";
            return json_encode($res);
        }
    }
}
开发者ID:ItsJimi,项目名称:42,代码行数:60,代码来源:pics.php


示例5: __construct

 public function __construct()
 {
     parent::__construct();
     if (!is_connected()) {
         $this->lang->load('12parfait', $this->config->item('language'));
     } else {
         $this->lang->load('12parfait', $this->session->userdata['user']->language);
     }
 }
开发者ID:sbrodin,项目名称:12parfait,代码行数:9,代码来源:Contact.php


示例6: __construct

 public function __construct()
 {
     $this->load->helper('memberspace/connection');
     if (!is_connected()) {
         die(translate('Vous ne pouvez pas accéder à vos fichiers si vous n\'êtes pas connecté.'));
     }
     parent::__construct();
     $this->load->library('layout/layout');
     $this->load->helper('memberspace/authorization');
     $this->load->helper('images/image');
     $this->load->database();
 }
开发者ID:Cevantime,项目名称:site-core-modules,代码行数:12,代码来源:FILEBROWSER_Controller.php


示例7: __construct

 public function __construct()
 {
     parent::__construct();
     // Authentification de l'utilisateur
     if (!is_connected()) {
         // Redirige l'utilisateur vers la page de connexion s'il n'est pas authentifié
         $this->lang->load('12parfait', $this->config->item('language'));
         redirect(site_url(), 'location');
     } else {
         $this->lang->load('12parfait', $this->session->userdata['user']->language);
     }
     // on n'active le profiler qu'en dev
     if (ENVIRONMENT === 'development') {
         // $this->output->enable_profiler(true);
     }
 }
开发者ID:sbrodin,项目名称:12parfait,代码行数:16,代码来源:MY_Controller.php


示例8: checkForUpdate

/**
 * Searches the zenphoto.org home page for the current zenphoto download
 * locates the version number of the download and compares it to the version
 * we are running.
 *
 * @return string If there is a more current version on the WEB, returns its version number otherwise returns FALSE
 * @since 1.1.3
 */
function checkForUpdate()
{
    $webVersion = false;
    if (is_connected() && class_exists('DOMDocument')) {
        require_once dirname(__FILE__) . '/zenphoto_news/rsslib.php';
        $recents = RSS_Retrieve("http://www.zenphoto.org/index.php?rss=news&category=changelog");
        if ($recents) {
            array_shift($recents);
            $article = array_shift($recents);
            //	most recent changelog article
            $v = trim(str_replace('zenphoto-', '', basename($article['link'])));
            $c = explode('-', ZENPHOTO_VERSION);
            $c = array_shift($c);
            if ($v && version_compare($c, $v, "<")) {
                $webVersion = $v;
            }
        }
    }
    return $webVersion;
}
开发者ID:rb26,项目名称:zenphoto,代码行数:28,代码来源:check_for_update.php


示例9: mailInfo

 function mailInfo()
 {
     if (is_connected()) {
         $CI = get_instance();
         // You may need to load the model if it hasn't been pre-loaded
         $CI->load->model('account/mailbox_model');
         // Call a function of the model
         //$CI->mailbox->do_something();
         $mailbox_settings = $CI->mailbox_model->get();
         if (!empty($mailbox_settings)) {
             $address = "{" . $mailbox_settings->mail_server . "}" . $mailbox_settings->mailbox;
             $email = $mailbox_settings->email;
             $password = $mailbox_settings->password;
             if ($inbox = imap_open($address, $email, $password, OP_READONLY)) {
                 // Get general mailbox information.
                 $info = imap_status($inbox, $address, SA_ALL);
                 $mailInfo = array('unread' => $info->unseen, 'recent' => $info->recent, 'total' => $info->messages);
                 return $mailInfo;
             }
         }
     }
 }
开发者ID:erwiensatrya,项目名称:dentalclinic,代码行数:22,代码来源:mailbox_helper.php


示例10: restore

function restore($pdo)
{
    if (isset($_GET['type'], $_GET['file']) && !empty($_GET['type']) && !empty($_GET['file'])) {
        $type = $_GET['type'];
        $file = trim($_GET['file']);
        $internet = false;
        if ($type == 'cloud') {
            if (is_connected()) {
                $internet = true;
                $drop_sql = dropboxDBfiles();
                if (in_array($file, $drop_sql)) {
                    if (dropboxRestore($file)) {
                        import_to_db('dbbackup' . DS . 'dropbox' . DS . $file);
                    }
                }
            }
        } else {
            if ($type == 'local') {
                if (file_exists('dbbackup' . DS . $file)) {
                    import_to_db('dbbackup' . DS . $file);
                }
            }
        }
    }
    redirect(BASE_PATH . '/backup/?token=' . $_SESSION['token'], 1);
}
开发者ID:parsinegar2015,项目名称:parsinegar,代码行数:26,代码来源:backup.php


示例11: gettext

<?php

$button_text = gettext("Check for update");
$button_action = WEBPATH . '/' . ZENFOLDER . '/admin.php?action=check_for_update';
$button_icon = 'images/accept.png';
$button_title = gettext("Queries the Zenphoto web site for the latest version and compares that with the one that is running.");
$button_alt = gettext('Check for update');
$button_hidden = '<input type="hidden" name="action" value="check_for_update" />';
$button_rights = ADMIN_RIGHTS;
$button_enable = is_connected();
开发者ID:hatone,项目名称:zenphoto-1.4.1.4,代码行数:10,代码来源:check_for_update.php


示例12: is_connected

//make sure this is set to what you want vlans to start with, e.g. vlan3309
if (!isset($_POST) || $_POST != '') {
    ?>
<html>
<body style="background-color: e0e7f7";>
<form action="fast_config.php" method="POST"/>
<table border="0">
<tr><td style="border-left: dashed 1px; border-top: dashed 1px;">VLAN:</td><td style="border-right: dashed 1px; border-top: dashed 1px;"><input type="text" name="vlan"/></td></tr>
<tr><td style="border-left: dashed 1px; border-bottom: dashed 1px;">Interface: </td><td style="border-right: dashed 1px; border-bottom: dashed 1px;"><input type="text" name="interface"/></td></tr>
<tr><td>Subnet:</td><td><input type="text" name="subnet"/></td><td><input value="Apply" type="submit"/></td>
</table>
<?php 
}
if (isset($_POST['subnet']) && $_POST['subnet'] != '') {
    do {
        is_connected();
    } while (is_connected() != '1');
    if ($_POST['vlan'] != '') {
        make_vlan($_POST['vlan'], $_POST['interface']);
    }
    set_addr($_POST['subnet'], $_POST['vlan']);
}
function is_connected()
{
    $connected = @fsockopen("192.168.88.1", "80");
    //website and port
    if ($connected) {
        $is_conn = true;
        //action when connected
        fclose($connected);
    } else {
开发者ID:jamenlang,项目名称:mikrotik-php,代码行数:31,代码来源:fast_config.php


示例13: second_connected

function second_connected()
{
    for ($i = 5; $i > 0; $i--) {
        if (is_connected(1) != '1') {
            if ($i == 1) {
                logthis('no more mikrotiks. killing myself. ');
                sleep(4);
            } else {
                logthis('dying in : ' . ($i - 1) . ' cycles');
            }
        } else {
            return 1;
        }
    }
    header('Location: ' . $GLOBALS['finished_location'] . '');
    exit;
}
开发者ID:jamenlang,项目名称:mikrotik-php,代码行数:17,代码来源:cookiecutter.php


示例14: sendMailAutomatically

function sendMailAutomatically()
{
    $currentDate = date("Y/m/d");
    $dueDate = date('Y-m-d', strtotime($currentDate . ' + 1 days'));
    $conn = mysqli_connect('localhost', 'root', 'phenol69', 'LibraryNotifier');
    // Check connection
    if ($conn->connect_error) {
        die("Connection failed: " . $conn->connect_error);
    }
    $sql = "select *from book where DueDate='" . $dueDate . "'";
    $result = $conn->query($sql);
    if ($result->num_rows > 0) {
        $sId = array();
        $bName = array();
        while ($row = $result->fetch_assoc()) {
            $sId[] = $row["StudentId"];
            $bName[] = $row['BookName'];
        }
        $mailNumber = count($sId);
        foreach ($sId as $value) {
            $queryStudent = "select *from student WHERE Rollno = '" . $value . "'";
            $result1 = $conn->query($queryStudent);
            while ($row1 = $result1->fetch_assoc()) {
                $emailId[] = $row1["Email"];
            }
        }
        //
        require_once '../CommonPage/initializer.php';
        $connection = is_connected();
        if ($connection == true) {
            require_once '../control/phpMailer/class.phpmailer.php';
            require_once "../control/phpMailer/class.smtp.php";
            require '../control/phpMailer/PHPMailerAutoload.php';
            $mailer = new PHPMailer();
            $mailer->IsSMTP();
            $mailer->SMTPSecure = 'tls';
            $mailer->Host = 'smtp.gmail.com';
            $mailer->Port = 587;
            $mailer->Username = '[email protected]';
            $mailer->Password = 'majuwasachin69';
            $mailer->SMTPAuth = true;
            $mailer->From = '[email protected]';
            $mailer->FromName = 'Library';
            $mailer->Subject = 'Book Due Date Tomorrow';
            for ($i = 0; $i < $mailNumber; $i++) {
                $studentMail = $emailId[$i];
                $bookName = $bName[$i];
                $mailer->Body = 'Hello You have to return ' . $bookName . " Tomorrow";
                $mailer->ClearAddresses();
                $mailer->AddAddress($studentMail);
                $mailCount = 1;
                if ($mailer->Send()) {
                    $sql = "UPDATE mailservice SET EmailCount = {$mailCount} WHERE id = 1";
                    $conn->query($sql);
                    $mailCount++;
                }
            }
        } else {
            redirect_to('admin.php');
        }
    } else {
    }
}
开发者ID:sachin-aryal,项目名称:LibraryNotifier,代码行数:63,代码来源:function.php


示例15: substr

                $base = substr($clone, strlen($base));
                $link = $base . '/' . ZENFOLDER . '/admin.php';
                $source = '<a href="' . $link . '">' . $clone . '</a>';
            } else {
                $source = $clone;
            }
            $source = '<br />&nbsp;&nbsp;&nbsp;' . sprintf(gettext('source: %s'), $source);
        }
        $graphics_lib = zp_graphicsLibInfo();
        ?>
								<li>
									<?php 
        printf(gettext('Zenphoto version <strong>%1$s [%2$s] (%3$s)</strong>'), ZENPHOTO_VERSION, '<a title="' . ZENPHOTO_FULL_RELEASE . '">' . ZENPHOTO_RELEASE . '</a>', $official);
        echo $source;
        if (extensionEnabled('check_for_update') && TEST_RELEASE) {
            if (is_connected() && class_exists('DOMDocument')) {
                require_once SERVERPATH . '/' . ZENFOLDER . '/' . PLUGIN_FOLDER . '/zenphoto_news/rsslib.php';
                $recents = RSS_Retrieve("http://www.zenphoto.org/index.php?rss=news&category=changelog");
                if ($recents) {
                    array_shift($recents);
                    $article = array_shift($recents);
                    //	most recent changelog article
                    $v = trim(str_replace('zenphoto-', '', basename($article['link'])));
                    $c = explode('-', ZENPHOTO_VERSION);
                    $c = array_shift($c);
                    if ($v && version_compare($c, $v, '>')) {
                        ?>
													<p class="notebox">
														<a href="http://www.zenphoto.org/news/zenphoto-<?php 
                        echo $c;
                        ?>
开发者ID:biggtfish,项目名称:zenphoto,代码行数:31,代码来源:admin.php


示例16: printNews

function printNews()
{
    ?>
	<div class="box overview-utility">
		<h2 class="h2_bordered"><?php 
    echo gettext("News from Zenphoto.org");
    ?>
</h2>
		<?php 
    if (is_connected()) {
        require_once dirname(__FILE__) . '/zenphoto_news/rsslib.php';
        require_once SERVERPATH . '/' . ZENFOLDER . '/template-functions.php';
        $recents = RSS_Retrieve("http://www.zenphoto.org/index.php?rss=news&withimages");
        if ($recents) {
            $opened = false;
            $recents = array_slice($recents, 1, 5);
            $shorten = getOption('zenphoto_news_length');
            foreach ($recents as $article) {
                $type = $article["type"];
                if ($type == 0) {
                    if ($opened) {
                        ?>
						</ul>
						<?php 
                        $opened = false;
                    }
                    ?>
					<b />
					<?php 
                } else {
                    if (!$opened) {
                        ?>
						<ul>
							<?php 
                        $opened = true;
                    }
                }
                $title = $article["title"];
                $date = zpFormattedDate(DATE_FORMAT, strtotime($article["pubDate"]));
                $link = $article["link"];
                if ($shorten) {
                    $description = shortenContent($article["description"], $shorten, '...');
                } else {
                    $description = false;
                }
                ?>
					<li><a href="<?php 
                echo $link;
                ?>
"><strong><?php 
                echo $title;
                ?>
</strong> (<?php 
                echo $date;
                ?>
)</a>
						<?php 
                if ($description != false) {
                    ?>
							<br />
							<?php 
                    echo $description;
                }
                ?>
					</li>
					<?php 
                if ($type == 0) {
                    ?>
						<br />
						<?php 
                }
            }
            if ($opened) {
                ?>
				</ul>
				<?php 
            }
        } else {
            ?>
			<ul>
				<li><?php 
            printf(gettext('Failed to retrieve link <em>%s</em>'), 'http://www.zenphoto.org/index.php?rss=news&withimages');
            ?>
</li>
			</ul>
			<?php 
        }
    } else {
        ?>
		<ul>
			<li><?php 
        echo gettext('A connection to <em>Zenphoto.org</em> could not be established.');
        ?>
			</li>
		</ul>
		<?php 
    }
    ?>
	</div>
	<?php 
//.........这里部分代码省略.........
开发者ID:rb26,项目名称:zenphoto,代码行数:101,代码来源:zenphoto_news.php


示例17: session_start

*/
/* --- CONSTRUCT SESSION --- */
session_start();
/* --- CKEDITOR SESSION --- */
$_SESSION['KCFINDER'] = array();
$_SESSION['KCFINDER']['disabled'] = false;
/* --- SESSION DUAL LANGUAGE --- */
if (!isset($_SESSION['lang'])) {
    $_SESSION['lang'] = "en";
}
/* --- CALL FUNCTIONS --- */
$info = get_info();
$general = get_general();
$global_user = get_customer_global($_SESSION['user_id']);
$notif = get_notification_global();
$internet = is_connected();
/*
* ----------------------------------------------------------------------
* CUSTOM FUNCTION
* ----------------------------------------------------------------------
*/
/* --- SHORTEN FUNCTIONS DATABASE --- */
function db($sql)
{
    $conn = connDB();
    $query = mysql_query($sql, $conn);
    $row = array();
    while ($result = mysql_fetch_array($query)) {
        array_push($row, $result);
    }
    return $row;
开发者ID:nickyudha,项目名称:spalosophy,代码行数:31,代码来源:general.php


示例18: is_connected

<?php

include '../CommonPage/initializer.php';
$connection = is_connected();
if ($connection == true) {
    require_once 'phpMailer/class.phpmailer.php';
    require_once "phpMailer/class.smtp.php";
    require 'phpMailer/PHPMailerAutoload.php';
    $mailer = new PHPMailer();
    $mailer->IsSMTP();
    $mailer->SMTPSecure = 'tls';
    $mailer->Host = 'smtp.gmail.com';
    $mailer->Port = 587;
    $mailer->Username = '[email protected]';
    $mailer->Password = 'majuwasachin69';
    $mailer->SMTPAuth = true;
    $mailer->From = '[email protected]';
    $mailer->FromName = 'Library';
    $mailer->Subject = 'Book Due Date Tomorrow';
    $totalMail = $_POST['mailNumber'];
    for ($i = 0; $i < $totalMail; $i++) {
        $studentMail = $_POST['emailId_' . $i];
        $bookName = $_POST['bookName_' . $i];
        $mailer->Body = 'You have to return ' . $bookName . " Tomorrow. Please return book before 7 PM.";
        $mailer->ClearAddresses();
        $mailer->AddAddress($studentMail);
        if ($mailer->Send()) {
            $_SESSION["mailSent"] = true;
        } else {
            $_SESSION["mailSent"] = false;
            redirect_to('admin.php');
开发者ID:sachin-aryal,项目名称:LibraryNotifier,代码行数:31,代码来源:sendMail.php


示例19: userinfo

require_once 'includes/allreputation.php';
require_once 'includes/alllocales.php';
$query = $_GET["profile"];
require_once 'includes/allprofiles.php';
require_once 'configs/tplconfig.php';
$smarty->config_load($conf_file, 'profile');
$profile['user'] = userinfo($query);
$profile['inventory'] = citems($query);
$profile['profession'] = userprofs($query);
$profile['achievements'] = $cDB->selectCell('SELECT COUNT(*) FROM character_achievement WHERE guid=?', $query);
$profile['guild']['guid'] = $cDB->selectCell('SELECT guildid FROM guild_member WHERE guid=?', $profile['user']['guid']);
$profile['guild']['name'] = $cDB->selectCell('SELECT name FROM guild WHERE guildid=?', $profile['guild']['guid']);
$url = "http://wowhead.com";
if ($viewer == 1) {
    $profile['is_connected'] = is_connected();
} else {
    $profile['is_connected'] = false;
}
$profile['qcomp'] = $cDB->selectCell('SELECT COUNT(*) FROM character_queststatus WHERE guid=? and status IN(0,1,3)', $query);
$profile['aquests'] = $DB->selectCell('SELECT COUNT(Id)
		FROM quest_template
		WHERE
			Title NOT IN ("","----","?????")
			AND Title NOT LIKE "<DEPRECATED>%"
			AND Title NOT LIKE "<NYI>%"
			AND Title NOT LIKE "<nyi>%"
			AND Title NOT LIKE "<TEST>%"
			AND Title NOT LIKE "<TXT>%"
			AND Title NOT LIKE "<UNUSED%"
			');
开发者ID:BACKUPLIB,项目名称:Infinity_MaNGOS,代码行数:30,代码来源:profile.php


示例20: modifier_sous_categorie

 public function modifier_sous_categorie($id = null)
 {
     // On vérifie qu'il s'agit bien d'un admin :
     if (is_connected() && $_SESSION['niveau'] == 1) {
         $this->load->helper('form');
         $this->load->library('form_validation');
         // On fixe les règles concernant l'ajout d'une recette :
         //$this->form_validation->set_rules('categorie_mere', '"Nom de la catégorie mère"', 'trim|required|encode_php_tags');
         $this->form_validation->set_rules('categorie_fille', '"Nom de la sous-catégorie"', 'trim|required|encode_php_tags');
         if ($this->form_validation->run()) {
             // On récupère l'id de la catégorie mère :
             $this->load->model('CategorieManager');
             $categorieManager = new CategorieManager();
             $data = array('nom_categorie' => $this->input->post('categorie_fille'));
             // On met à jour les données :
             $this->db->where('id_categorie', $this->input->post('id_categorie'));
             $this->db->update('categorie', $data);
             redirect('administration/administrer_sous_categories');
         } else {
             $this->load->model('CategorieManager');
             $categorieManager = new CategorieManager();
             $sous_categorie = $categorieManager->get_categorie_mere($id);
             $data = array();
             $data['sous_categorie'] = $sous_categorie;
             $data['id'] = $id;
             $data['menu_categories'] = $this->menu_categories;
             $this->layout->view('modifier_sous_categorie', $data);
         }
     } else {
         redirect('accueil');
     }
 }
开发者ID:erwan-neel,项目名称:easy_cooking,代码行数:32,代码来源:Administration.php



注:本文中的is_connected函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP is_content_administrator_rs函数代码示例发布时间:2022-05-15
下一篇:
PHP is_comments_popup函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap