本文整理汇总了PHP中front::toUtf方法的典型用法代码示例。如果您正苦于以下问题:PHP front::toUtf方法的具体用法?PHP front::toUtf怎么用?PHP front::toUtf使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类front
的用法示例。
在下文中一共展示了front::toUtf方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getinfoAction
public function getinfoAction()
{
$db = front::og('db');
$one_news = $db->select('SELECT id, title, msg FROM corporative_blog WHERE id = ?n LIMIT 1;', front::$_req['id'])->fetchRow();
$one_news = front::toUtf($one_news);
echo json_encode(array('form' => $one_news));
}
示例2: getinfoAction
function getinfoAction()
{
$db = front::og("db");
$one_news = $db->select("SELECT id, post_date, header, n_text FROM news WHERE id = ?n LIMIT 1;", front::$_req["id"])->fetchRow();
$one_news = front::toUtf($one_news);
echo json_encode(array("form" => $one_news));
}
示例3: getlistAction
function getlistAction()
{
$data[] = array("title" => "Контроллеры", "_is_leaf" => false, "testable" => false, "_parent" => null, "_id" => "1");
$data = $this->readMap(front::$map, $data);
$data[] = array("title" => "Модели", "_is_leaf" => false, "_parent" => null, "_id" => "2");
$dir = opendir(ROOT_DIR . "engine/models/");
while ($file = readdir($dir)) {
if ($file != "." && $file != ".." && $file != ".svn") {
$testable = true;
$class_name = array_shift(explode(".", $file));
$test_path = "tests/models/" . $class_name . ".model.test.php";
if (!file_exists(ROOT_DIR . "engine/" . $test_path)) {
$test_path = "<b>Нет " . $test_path . "</b>";
$testable = false;
}
$data[] = array("title" => $file, "path" => $test_path . "<i> для " . $file . "</i>", "testable" => $testable, "result" => $testable ? 0 : 4, "run_path" => "tests/models/" . $class_name . ".model.test.php", "_is_leaf" => true, "_parent" => "2", "_id" => "3:" . $class_name);
}
}
closedir($dir);
$data[] = array("title" => "Другие", "_is_leaf" => false, "_parent" => null, "_id" => "3");
$dir = opendir(ROOT_DIR . "engine/tests/");
while ($file = readdir($dir)) {
if ($file != "." && $file != ".." && is_file(ROOT_DIR . "engine/tests/" . $file)) {
$testable = true;
$data[] = array("title" => $file, "path" => $file, "testable" => $testable, "result" => $testable ? 0 : 4, "run_path" => "tests/" . $file, "_is_leaf" => true, "_parent" => "3", "_id" => "4:" . $file);
}
}
closedir($dir);
$data = front::toUtf($data);
echo json_encode(array("data" => $data));
}
示例4: getlistAction
public function getlistAction()
{
$data[] = array('title' => 'Контроллеры', '_is_leaf' => false, 'testable' => false, '_parent' => null, '_id' => '1');
$data = $this->readMap(front::$map, $data);
$data[] = array('title' => 'Модели', '_is_leaf' => false, '_parent' => null, '_id' => '2');
$dir = opendir(ROOT_DIR . 'engine/models/');
while ($file = readdir($dir)) {
if ($file != '.' && $file != '..' && $file != '.svn') {
$testable = true;
$class_name = array_shift(explode('.', $file));
$test_path = 'tests/models/' . $class_name . '.model.test.php';
if (!file_exists(ROOT_DIR . 'engine/' . $test_path)) {
$test_path = '<b>Нет ' . $test_path . '</b>';
$testable = false;
}
$data[] = array('title' => $file, 'path' => $test_path . '<i> для ' . $file . '</i>', 'testable' => $testable, 'result' => $testable ? 0 : 4, 'run_path' => 'tests/models/' . $class_name . '.model.test.php', '_is_leaf' => true, '_parent' => '2', '_id' => '3:' . $class_name);
}
}
closedir($dir);
$data[] = array('title' => 'Другие', '_is_leaf' => false, '_parent' => null, '_id' => '3');
$dir = opendir(ROOT_DIR . 'engine/tests/');
while ($file = readdir($dir)) {
if ($file != '.' && $file != '..' && is_file(ROOT_DIR . 'engine/tests/' . $file)) {
$testable = true;
$data[] = array('title' => $file, 'path' => $file, 'testable' => $testable, 'result' => $testable ? 0 : 4, 'run_path' => 'tests/' . $file, '_is_leaf' => true, '_parent' => '3', '_id' => '4:' . $file);
}
}
closedir($dir);
$data = front::toUtf($data);
echo json_encode(array('data' => $data));
}
示例5: getinfoAction
function getinfoAction()
{
$db = front::og("db");
$one_page = $db->select("SELECT * FROM static_pages WHERE alias = ? LIMIT 1;", front::$_req["id"])->fetchRow();
$one_page = front::toUtf($one_page);
$one_page["n_text"] = $this->nl2br2($one_page["n_text"]);
echo json_encode(array("form" => $one_page));
}
示例6: getCategsAction
function getCategsAction()
{
$db = front::og("db");
// ,
$all = $db->select("SELECT id, name FROM faq_category f WHERE (f.name ILIKE ?);", "%" . trim(front::toWin(front::$_req["query"])) . "%")->fetchAll();
$all = front::toUtf($all);
echo json_encode(array("data" => $all));
}
示例7: getCategsAction
public function getCategsAction()
{
$db = front::og('db');
// ,
$all = $db->select('SELECT id, name FROM faq_category f WHERE (f.name ILIKE ?);', '%' . trim(front::toWin(front::$_req['query'])) . '%')->fetchAll();
$all = front::toUtf($all);
echo json_encode(array('data' => $all));
}
示例8: getinfoAction
public function getinfoAction()
{
$db = front::og('db');
$one_news = $db->select('SELECT tp.*, tg.title as group_name FROM team_people tp JOIN team_groups tg on tg.id = tp.groupid WHERE tp.id = ?n LIMIT 1;', front::$_req['id'])->fetchRow();
$one_news = front::toUtf($one_news);
$one_news['additional'] = br2nl($one_news['additional']);
echo json_encode(array('form' => $one_news));
}
示例9: getinfoAction
function getinfoAction()
{
$db = front::og("db");
$one_news = $db->select("SELECT tp.*, tg.title as group_name FROM team_people tp JOIN team_groups tg on tg.id = tp.groupid WHERE tp.id = ?n LIMIT 1;", front::$_req["id"])->fetchRow();
$one_news = front::toUtf($one_news);
$one_news["additional"] = br2nl($one_news["additional"]);
echo json_encode(array("form" => $one_news));
}
示例10: getinfoAction
public function getinfoAction()
{
$db = front::og('db');
$one_page = $db->select('SELECT * FROM static_pages WHERE alias = ? LIMIT 1;', front::$_req['id'])->fetchRow();
$one_page = front::toUtf($one_page);
$one_page['n_text'] = $this->nl2br2($one_page['n_text']);
echo json_encode(array('form' => $one_page));
}
示例11: getinfoAction
function getinfoAction()
{
$db = front::og("db");
$one_news = $db->select("SELECT id, title, msg, yt_link, id_user FROM corporative_blog WHERE id = ?n LIMIT 1;", front::$_req["id"])->fetchRow();
$user = front::og("db")->select("SELECT login FROM users WHERE uid = ?n", $one_news['id_user'])->fetchRow();
$attach = front::og("db")->select("SELECT * FROM corporative_blog_attach WHERE msg_id = ?n", front::$_req["id"])->fetchAll();
if ($attach) {
foreach ($attach as $key => $val) {
$res_attach[] = array("db_id" => $val["id"], "id" => $val["name"], "path" => WDCPREFIX . "/users/" . $user["login"] . "/upload" . "/" . $val["name"]);
}
$one_news["files"] = json_encode($res_attach);
}
$one_news = front::toUtf($one_news);
echo json_encode(array("form" => $one_news));
}
示例12: getinfoAction
public function getinfoAction()
{
$db = front::og('db');
$one_news = $db->select('SELECT id, title, msg, yt_link, id_user FROM corporative_blog WHERE id = ?n LIMIT 1;', front::$_req['id'])->fetchRow();
$user = front::og('db')->select('SELECT login FROM users WHERE uid = ?n', $one_news['id_user'])->fetchRow();
$attach = front::og('db')->select('SELECT * FROM corporative_blog_attach WHERE msg_id = ?n', front::$_req['id'])->fetchAll();
if ($attach) {
foreach ($attach as $key => $val) {
$res_attach[] = array('db_id' => $val['id'], 'id' => $val['name'], 'path' => WDCPREFIX . '/users/' . $user['login'] . '/upload' . '/' . $val['name']);
}
$one_news['files'] = json_encode($res_attach);
}
$one_news = front::toUtf($one_news);
echo json_encode(array('form' => $one_news));
}