本文整理汇总了PHP中pre函数的典型用法代码示例。如果您正苦于以下问题:PHP pre函数的具体用法?PHP pre怎么用?PHP pre使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了pre函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: get_data_by_stats
function get_data_by_stats($ws = false)
{
$ws_sql = $ws !== false ? " wa_status='" . $ws . "'" : "";
$sql = "SELECT * FROM (\n\t\t\t\t\tSELECT count(idx) as total, propinsi, (\n\t\t\t\t\t\tCASE \n\t\t\t\t\t\t\tWHEN (wa_status=0) \n\t\t\t\t\t\t\tTHEN 'In Progress' \n\t\t\t\t\t\t\tWHEN (wa_status=1) \n\t\t\t\t\t\t\tTHEN 'Teregistrasi' \n\t\t\t\t\t\t\tWHEN (wa_status=2) \n\t\t\t\t\t\t\tTHEN 'Terverifikasi' \n\t\t\t\t\t\t\tELSE 'Tersertifikasi' \n\t\t\t\t\t\tEND\n\t\t\t\t\t\t) AS wa_status\n\t\t\t\t\t\tFROM \n\t\t\t\t\t\t\tv_wa_data\n\t\t\t\t\t\tWHERE\n\t\t\t\t\t\t\t" . $ws_sql . "\n\t\t\t\t\t\tGROUP BY \n\t\t\t\t\t\t\tpropinsi,wa_status\n\t\t\t\t\t) stats\n\t\t\t\tORDER BY total";
$arrData = $this->conn->GetAll($sql);
pre($arrData);
}
示例2: Example_Ajax
function Example_Ajax()
{
global $page, $addonRelativeCode;
//prepare the page
$page->head_js[] = $addonRelativeCode . 'static/02_script.js';
$page->admin_js = true;
//get request parameters and execute any commands
$string = '';
if (isset($_REQUEST['string'])) {
$string = $_REQUEST['string'];
}
$cmd = common::GetCommand();
switch ($cmd) {
case 'randomstring':
$string = common::RandomString(10);
break;
}
//display the form
echo '<h2>Example Ajax Requests</h2>';
echo '<form method="post" action="' . $page->title . '">';
echo 'Text: <input type="text" name="string" value="' . htmlspecialchars($string) . '" size="30" />';
echo ' <input type="submit" class="gpajax" value="Post Form Asynchronosly" /> ';
echo common::Link($page->title, 'Get Random String', 'cmd=randomstring', 'name="gpajax"');
echo '</form>';
//output the $_REQUEST variable
echo '<h3>Request</h3>';
echo pre($_REQUEST);
//plugin example navigation
gpPlugin::incl('navigation.php');
PluginExampleNavigation();
}
示例3: img
public function img()
{
$u_dados = $this->_upload();
pre($u_dados);
if ($u_dados->cod == 999) {
echo '<img title="' . $u_dados->client_name . '" alt="' . $u_dados->client_name . '" src="' . base_url('imagens/' . $u_dados->name) . '" />';
}
}
示例4: prj
function prj($input, $exit = false)
{
if (is_string($input)) {
$input = json_decode($input);
}
$input = json_encode($input, JSON_PRETTY_PRINT);
pre($input, $exit);
}
示例5: dump
public static function dump($data, $dumptoScreen = false)
{
if ($dumptoScreen) {
pre($data);
die;
}
self::add_message('<xmp>' . print_r($data, 1) . '</xmp>');
}
示例6: execute
public function execute()
{
$url = Config::getInstance()->get('interior.server_url');
$connection = new Connection($url);
$connection->usePost(false);
pre($connection->get('knowledgepoint.get', array(), true));
exit;
}
示例7: test_db
public function test_db()
{
//$conn=$this->conn;
$conn = get_db_config("esirs");
$conn->debug = true;
$sql = "select * from airport";
$arr = $conn->GetAll($sql);
pre($arr);
}
示例8: test_action
public function test_action()
{
if ($this->user->logged()) {
pre($this->user->data());
}
if ($this->user->request_recovery($this->uri->segment(3))) {
echo $this->uri->segment(3);
}
}
示例9: transform
public function transform($value)
{
pre($value);
exit;
if ($value === null) {
return '';
}
return $value->getId();
}
示例10: query
public function query($sql, array $params = array())
{
if (isset($_SESSION) && $_SESSION["debug"]) {
pre($sql);
pre($params);
}
$this->model->exec($sql, $params);
return $this;
}
示例11: code_action
public function code_action()
{
$code = $this->uri->segment(2);
$user = $this->user->check_recovery($code);
if ($user) {
pre($user);
} else {
echo "asd";
}
}
示例12: test
function test()
{
echo $_SERVER['SERVER_ADDR'];
die;
$this->load->model('Order_model', 'order');
//$rs= $this->order->details(8);
$rs = $this->order->get_all_chield_order(12);
pre($rs);
//pre(unserialize(base64_decode($rs[0]->orderInfo)));
}
示例13: ae_send_admin_email
function ae_send_admin_email($post_id)
{
$to = 'prajwal_stha@yahoo.com';
$subject = 'A new post has been dropped.';
$message = "Please Assign the editor to review the post: " . get_permalink($post_id);
$send = wp_mail($to, $subject, $message);
if ($send) {
pre('sent');
}
pre('not sent');
}
示例14: main
public function main()
{
$this->model->id = 1;
// get from request
$book = $this->model->find();
pre($book);
$books = $this->model->findAll();
$books = $this->model->findAll('id > ?', [0]);
pre($books);
// $this->view('main');
// $this->view->display('main');
}
示例15: getUserInfo
/**
* @param $user_id
* @return array|null
*/
public function getUserInfo($user_id)
{
$sql = <<<SQL
SELECT * FROM {@auth_table} AS a LEFT JOIN {@profile_table} AS p ON a.`id` = p.`id` WHERE a.`id` = :id
SQL;
$auth_table = UserAuthModel::getTableName();
$profile_table = UserProfileModel::getTableName();
$sql = strtr($sql, array('{@auth_table}' => $auth_table, '{@profile_table}' => $profile_table));
pre($sql, false);
$query = $this->getSelectQuery($sql, array(':id' => $user_id));
return $query->getRow();
}