本文整理汇总了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