本文整理汇总了PHP中front::toWin方法的典型用法代码示例。如果您正苦于以下问题:PHP front::toWin方法的具体用法?PHP front::toWin怎么用?PHP front::toWin使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类front
的用法示例。
在下文中一共展示了front::toWin方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: 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));
}
示例2: 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));
}
示例3: 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));
}
示例4: 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));
}
示例5: 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));
}
示例6: 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));
}
示例7: 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));
}
示例8: 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));
}
示例9: 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));
}
示例10: 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));
}
示例11: editRadzelAction
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));
}
示例12: 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));
}
示例13: saveAction
public function saveAction()
{
$db = front::og('db');
$save = front::toWin(array('title' => front::$_req['form']['title'], 'n_text' => front::$_req['form']['n_text']));
if ($id = front::$_req['id']) {
$aff = $db->update('UPDATE static_pages SET ?s WHERE (alias = ?)', $save, $id);
if (!$aff) {
$save['alias'] = $id;
$db->insert('static_pages', $save, false);
}
}
echo json_encode(array('success' => true, 'id' => $id));
}
示例14: saveAction
function saveAction()
{
$db = front::og("db");
$save = front::toWin(array("title" => front::$_req["form"]["title"], "n_text" => front::$_req["form"]["n_text"]));
if ($id = front::$_req["id"]) {
$aff = $db->update("UPDATE static_pages SET ?s WHERE (alias = ?)", $save, $id);
if (!$aff) {
$save["alias"] = $id;
$db->insert("static_pages", $save, false);
}
}
echo json_encode(array("success" => true, "id" => $id));
}
示例15: updViewPost
/**
* Обновить посты которые юзер посмотрел, для того чтобы в след раз когда он зашел он видел есть ли новые комментарии к посту
*
* @param integer $bid ИД поста
* @param unknown_type $date дата последнего просмотра (UNIX_TIME)
* @return array [дата, ИД]
*/
function updViewPost($bid, $date = false, $count = 0)
{
if (!$date) {
$date = date('c');
}
$save = front::toWin(array("uid" => get_uid(), "blog_id" => $bid, "date_view" => $date, "v_count" => intval($count)));
list($date, $id) = self::getViewPost(get_uid(), $bid);
if ($id) {
$aff = front::og("db")->update("UPDATE corporative_blog_update SET ?s WHERE (id = ?n)", $save, $id);
} else {
$id = front::og("db")->insert("corporative_blog_update", $save);
}
return array($date, $id);
}