當前位置: 首頁>>代碼示例>>PHP>>正文


PHP client::logged_in方法代碼示例

本文整理匯總了PHP中client::logged_in方法的典型用法代碼示例。如果您正苦於以下問題:PHP client::logged_in方法的具體用法?PHP client::logged_in怎麽用?PHP client::logged_in使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在client的用法示例。


在下文中一共展示了client::logged_in方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: client

<?php 
//check auth
include_once "../functions/client.php";
include_once "../functions/utils.php";
$client = new client();
if (!$client->logged_in()) {
    die("false");
}
//check POST
$table_name = null;
$fields_count = 0;
$foreign_keys_count = 0;
if ($_POST) {
    $table_name = totally_escape($_POST["table_name"]);
    $fields_count = $_POST["fields_count"];
    $foreign_keys_count = $_POST["foreign_keys_count"];
}
if ($table_name == null) {
    die("false: bad table_name");
}
//prepare statement
$types_arr = sql_types_array();
//TODO: test table_name is one word or something
$has_precision = array("NUMBER", "FLOAT", "INTERVAL YEAR TO MONTH", "INTERVAL DAY TO SECOND");
$has_length = array("NUMBER" => 38, "VARCHAR2" => 4000, "CHAR" => 2000, "TIMESTAMP" => -1, "INTERVAL DAY TO SECOND" => -1, "TIMESTAMP WITH TIME ZONE" => -1, "TIMESTAMP WITH LOCAL TIME ZONE" => -1, "RAW" => -1, "NCHAR" => 2000, "NVARCHAR2" => 4000);
//lol that's where we use transactions:
//COMMIT; //ends any other transactions
//SET TRANSACTION NAME 'sal_update'; //start transaction
//...
//ROLLBACK; //if fail
//COMMIT; //if success
開發者ID:Tkachov,項目名稱:POD,代碼行數:31,代碼來源:edit_table_fields.php


注:本文中的client::logged_in方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。