当前位置: 首页>>代码示例>>PHP>>正文


PHP front::og方法代码示例

本文整理汇总了PHP中front::og方法的典型用法代码示例。如果您正苦于以下问题:PHP front::og方法的具体用法?PHP front::og怎么用?PHP front::og使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在front的用法示例。


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

示例1: savewysiwygAction

 public function savewysiwygAction()
 {
     $db = front::og('db');
     $alias = front::$_req['alias'];
     // проверяем права (могут быть разные для разных страниц)
     switch ($alias) {
         default:
             $permission = null;
     }
     if (!$permission || !hasPermissions($permission)) {
         return;
     }
     $text = front::$_req['form']['n_text'];
     $text = iconv('UTF-8', 'CP1251', $text);
     $text = __paramValue('ckedit', $text);
     $title = front::$_req['form']['title'];
     $title = iconv('UTF-8', 'CP1251', $title);
     $title = __paramValue('string', $title);
     $save = array('title' => $title, 'n_text' => $text);
     if ($alias) {
         $aff = $db->update('UPDATE static_pages SET ?s WHERE (alias = ?)', $save, $alias);
         if (!$aff) {
             $save['alias'] = $alias;
             $db->insert('static_pages', $save, false);
         }
     }
     echo json_encode(array('success' => true, 'alias' => $alias));
 }
开发者ID:kapai69,项目名称:fl-ru-damp,代码行数:28,代码来源:page_admin_static_pages.class.php

示例2: savewysiwygAction

 function savewysiwygAction()
 {
     $db = front::og("db");
     $alias = front::$_req["alias"];
     // проверяем права (могут быть разные для разных страниц)
     switch ($alias) {
         default:
             $permission = null;
     }
     if (!$permission || !hasPermissions($permission)) {
         return;
     }
     $text = front::$_req["form"]["n_text"];
     $text = iconv('UTF-8', 'CP1251', $text);
     $text = __paramValue('ckedit', $text);
     $title = front::$_req["form"]["title"];
     $title = iconv('UTF-8', 'CP1251', $title);
     $title = __paramValue('string', $title);
     $save = array("title" => $title, "n_text" => $text);
     if ($alias) {
         $aff = $db->update("UPDATE static_pages SET ?s WHERE (alias = ?)", $save, $alias);
         if (!$aff) {
             $save["alias"] = $alias;
             $db->insert("static_pages", $save, false);
         }
     }
     echo json_encode(array("success" => true, "alias" => $alias));
 }
开发者ID:Nikitian,项目名称:fl-ru-damp,代码行数:28,代码来源:page_admin_static_pages.class.php

示例3: get

 static function get($alias)
 {
     $res = front::og("db")->select("SELECT * FROM static_pages WHERE alias = ? LIMIT 1;", $alias)->fetchRow();
     if (!$res) {
         $res = array("alias" => $alias);
     }
     return $res;
 }
开发者ID:Nikitian,项目名称:fl-ru-damp,代码行数:8,代码来源:static_pages.class.php

示例4: get

 public static function get($alias)
 {
     $res = front::og('db')->select('SELECT * FROM static_pages WHERE alias = ? LIMIT 1;', $alias)->fetchRow();
     if (!$res) {
         $res = array('alias' => $alias);
     }
     return $res;
 }
开发者ID:kapai69,项目名称:fl-ru-damp,代码行数:8,代码来源:static_pages.class.php

示例5: saveAction

 function saveAction()
 {
     $db = front::og("db");
     $save = front::toWin(array("title" => front::$_req["form"]["title"], "msg" => front::$_req["form"]["msg"], "id_blog" => 0, "id_user" => $_SESSION["uid"]));
     if (intval($id = front::$_req["id"]) > 0) {
         $aff = $db->update("UPDATE corporative_blog SET ?s WHERE (id = ?n)", $save, $id);
     } else {
         $id = $db->insert("corporative_blog", $save);
     }
     echo json_encode(array("success" => true, "id" => $id));
 }
开发者ID:Nikitian,项目名称:fl-ru-damp,代码行数:11,代码来源:page_admin_cblog.class.php

示例6: saveAction

 public function saveAction()
 {
     $db = front::og('db');
     $save = front::toWin(array('title' => front::$_req['form']['title'], 'msg' => front::$_req['form']['msg'], 'id_blog' => 0, 'id_user' => $_SESSION['uid']));
     if (intval($id = front::$_req['id']) > 0) {
         $aff = $db->update('UPDATE corporative_blog SET ?s WHERE (id = ?n)', $save, $id);
     } else {
         $id = $db->insert('corporative_blog', $save);
     }
     echo json_encode(array('success' => true, 'id' => $id));
 }
开发者ID:kapai69,项目名称:fl-ru-damp,代码行数:11,代码来源:page_admin_cblog.class.php

示例7: editRadzelAction

 public function editRadzelAction()
 {
     $db = front::og('db');
     $save = front::toWin(array('name' => front::$_req['title']));
     if (intval($id = front::$_req['id']) > 0) {
         $aff = $db->update('UPDATE faq_category SET ?s WHERE (id = ?n)', $save, $id);
     } else {
         $id = $db->insert('faq_category', $save);
     }
     echo json_encode(array('success' => true, 'id' => $id));
 }
开发者ID:kapai69,项目名称:fl-ru-damp,代码行数:11,代码来源:page_admin_faq.class.php

示例8: saveAction

 function saveAction()
 {
     $db = front::og("db");
     $save = front::toWin(array("name" => front::$_req["form"]["name"], "login" => front::$_req["form"]["login"], "occupation" => front::$_req["form"]["occupation"], "email" => front::$_req["form"]["email"], "icq" => front::$_req["form"]["icq"], "skype" => front::$_req["form"]["skype"], "login" => front::$_req["form"]["login"], "groupid" => front::$_req["form"]["groupid"], "additional" => front::$_req["form"]["additional"]));
     if (intval($id = front::$_req["id"]) > 0) {
         $aff = $db->update("UPDATE team_people SET ?s WHERE (id = ?n)", $save, $id);
     } else {
         $id = $db->insert("team_people", $save);
     }
     echo json_encode(array("success" => true, "id" => $id));
 }
开发者ID:Nikitian,项目名称:fl-ru-damp,代码行数:11,代码来源:page_admin_work.class.php

示例9: saveAction

 public function saveAction()
 {
     $db = front::og('db');
     $save = front::toWin(array('header' => front::$_req['form']['header'], 'n_text' => front::$_req['form']['n_text'], 'post_date' => front::$_req['form']['post_date']));
     if (intval($id = front::$_req['id']) > 0) {
         $aff = $db->update('UPDATE news SET ?s WHERE (id = ?n)', $save, $id);
     } else {
         $id = $db->insert('news', $save);
     }
     echo json_encode(array('success' => true, 'id' => $id));
 }
开发者ID:kapai69,项目名称:fl-ru-damp,代码行数:11,代码来源:page_admin_news.class.php

示例10: saveAction

 public function saveAction()
 {
     $db = front::og('db');
     $save = front::toWin(array('name' => front::$_req['form']['name'], 'login' => front::$_req['form']['login'], 'occupation' => front::$_req['form']['occupation'], 'email' => front::$_req['form']['email'], 'icq' => front::$_req['form']['icq'], 'skype' => front::$_req['form']['skype'], 'login' => front::$_req['form']['login'], 'groupid' => front::$_req['form']['groupid'], 'additional' => front::$_req['form']['additional']));
     if (intval($id = front::$_req['id']) > 0) {
         $aff = $db->update('UPDATE team_people SET ?s WHERE (id = ?n)', $save, $id);
     } else {
         $id = $db->insert('team_people', $save);
     }
     echo json_encode(array('success' => true, 'id' => $id));
 }
开发者ID:kapai69,项目名称:fl-ru-damp,代码行数:11,代码来源:page_admin_work.class.php

示例11: saveAction

 function saveAction()
 {
     $db = front::og("db");
     $save = front::toWin(array("header" => front::$_req["form"]["header"], "n_text" => front::$_req["form"]["n_text"], "post_date" => front::$_req["form"]["post_date"]));
     if (intval($id = front::$_req["id"]) > 0) {
         $aff = $db->update("UPDATE news SET ?s WHERE (id = ?n)", $save, $id);
     } else {
         $id = $db->insert("news", $save);
     }
     echo json_encode(array("success" => true, "id" => $id));
 }
开发者ID:Nikitian,项目名称:fl-ru-damp,代码行数:11,代码来源:page_admin_news.class.php

示例12: editRadzelAction

 function editRadzelAction()
 {
     $db = front::og("db");
     $save = front::toWin(array("name" => front::$_req["title"]));
     if (intval($id = front::$_req["id"]) > 0) {
         $aff = $db->update("UPDATE faq_category SET ?s WHERE (id = ?n)", $save, $id);
     } else {
         $id = $db->insert("faq_category", $save);
     }
     echo json_encode(array("success" => true, "id" => $id));
 }
开发者ID:Nikitian,项目名称:fl-ru-damp,代码行数:11,代码来源:page_admin_faq.class.php

示例13: saveAction

 public function saveAction()
 {
     $db = front::og('db');
     $save = front::toWin(array('msgtext' => front::$_req['form']['msgtext'], 'sign' => front::$_req['form']['sign'], 'link' => front::$_req['form']['link'], 'logo' => page_admin_flash_upload2::getFileValue(front::$_req['form']['logo'], 'about/opinions/')));
     //  foreach($save as &$one) { $one = ($one);}
     if (intval($id = front::$_req['id']) > 0) {
         $aff = $db->update('UPDATE sopinions SET ?s WHERE (id = ?n)', $save, $id);
     } else {
         $id = $db->insert('sopinions', $save);
     }
     echo json_encode(array('success' => true, 'id' => $id));
 }
开发者ID:kapai69,项目名称:fl-ru-damp,代码行数:12,代码来源:page_admin_opinions.class.php

示例14: editRadzelAction

 public function editRadzelAction()
 {
     $db = front::og('db');
     $save = front::toWin(array('title' => front::$_req['title']));
     if (intval($id = front::$_req['id']) > 0) {
         $aff = $db->update('UPDATE team_groups SET ?s WHERE (id = ?n)', $save, $id);
     } else {
         team::CreateGroup(front::$_req['title']);
         //$id = $db->insert("team_groups", $save);
     }
     echo json_encode(array('success' => true, 'id' => $id));
 }
开发者ID:kapai69,项目名称:fl-ru-damp,代码行数:12,代码来源:page_admin_team.class.php

示例15: saveAction

 function saveAction()
 {
     $db = front::og("db");
     $save = front::toWin(array("msgtext" => front::$_req["form"]["msgtext"], "sign" => front::$_req["form"]["sign"], "link" => front::$_req["form"]["link"], "logo" => page_admin_flash_upload2::getFileValue(front::$_req["form"]["logo"], "about/opinions/")));
     //  foreach($save as &$one) { $one = ($one);}
     if (intval($id = front::$_req["id"]) > 0) {
         $aff = $db->update("UPDATE sopinions SET ?s WHERE (id = ?n)", $save, $id);
     } else {
         $id = $db->insert("sopinions", $save);
     }
     echo json_encode(array("success" => true, "id" => $id));
 }
开发者ID:Nikitian,项目名称:fl-ru-damp,代码行数:12,代码来源:page_admin_opinions.class.php


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