當前位置: 首頁>>代碼示例>>PHP>>正文


PHP bd::quote方法代碼示例

本文整理匯總了PHP中bd::quote方法的典型用法代碼示例。如果您正苦於以下問題:PHP bd::quote方法的具體用法?PHP bd::quote怎麽用?PHP bd::quote使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在bd的用法示例。


在下文中一共展示了bd::quote方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: json_encode

<?php

require_once "../../clases/bd.php";
session_start();
$mesid = $_POST['id'];
$uid = $_SESSION['id'];
$table = "manager_fb_acc";
$db = new bd();
$query = "DELETE FROM manager_messages_scheduled WHERE id=" . $db->quote($mesid) . " AND userid=" . $db->quote($uid);
error_log($query);
if ($db->query($query)) {
    $return = array("e" => 0);
} else {
    $return = array("e" => 1);
}
echo json_encode($return);
開發者ID:darwinv,項目名稱:vogues,代碼行數:16,代碼來源:kill_message.php

示例2: bd

                        $soat['u'] = "" . $match[0];
                        $new = "http://1so.at/" . $hso->encode($soat);
                        $new_urls[] = $new != '' ? $new : $match[0];
                    }
                }
                $message = preg_replace($old_urls, $new_urls, $message);
            }
        }
    }
    return $message;
}
session_start();
$hdb = new bd();
$userid = $_SESSION["id"];
$table = "manager_messages_scheduled";
$sql = "SELECT * FROM {$table} WHERE userid = " . $hdb->quote($userid);
if ($res = $hdb->query($sql)) {
    if ($res->rowCount() < 11 || $_POST['edit']) {
        if ($_POST['publish_tw'] == 1) {
            $max_chars = 140;
        } else {
            $max_chars = 2000;
        }
        if ($_POST['img']) {
            if (substr($_POST['img'], 0, 4) == "data") {
                $fotob = new fotos();
                if ($img = $fotob->subirFotoManager($_POST['img'], $userid)) {
                } else {
                    error_log("Error al subir foto");
                    $img = "";
                }
開發者ID:darwinv,項目名稱:vogues,代碼行數:31,代碼來源:add_sch_message.php

示例3: json_encode

<?php

require_once "../../clases/bd.php";
session_start();
$type = $_POST['type'];
$pid = $_POST['pid'];
$uid = $_SESSION['id'];
switch ($type) {
    case "fb":
        $table = "manager_fb_acc";
        break;
    case "tw":
        $table = "manager_tw_acc";
        break;
    case "fbp":
        $table = "manager_fbp_acc";
        break;
    default:
        exit(json_encode(array("e" => 2)));
        break;
}
$db = new bd();
$query = "DELETE FROM {$table} WHERE id=" . $db->quote($pid) . " AND userid=" . $db->quote($uid);
if ($db->query($query)) {
    $return = array("e" => 0);
} else {
    $return = array("e" => 1);
}
echo json_encode($return);
開發者ID:darwinv,項目名稱:vogues,代碼行數:29,代碼來源:kill.php

示例4: bd

                        $soat['u'] = "" . $match[0];
                        $new = "http://1so.at/" . $hso->encode($soat);
                        $new_urls[] = $new != '' ? $new : $match[0];
                    }
                }
                $message = preg_replace($old_urls, $new_urls, $message);
            }
        }
    }
    return $message;
}
session_start();
$hdb = new bd();
$userid = $_SESSION["id"];
$table = "manager_messages_scheduled";
$sql = "SELECT * FROM {$table} userid=" . $hdb->quote($userid);
if ($res = $hdb->query($sql)) {
    if ($res->rowCount() < 11) {
        if ($_POST['publish_tw'] == 1) {
            $max_chars = 140;
        } else {
            $max_chars = 2000;
        }
        $message = cleanMessage($_POST['message'], $max_charts);
        if (!is_numeric($message) || $message > 5) {
            $fields = array('userid' => $userid, 'message' => $message, 'time_start' => $_POST['time_start'], 'time_end' => $_POST['time_end'], 'days' => $_POST['days'], 'hour' => $_POST['hour'], 'publish_fb' => $_POST['publish_fb'], 'publish_tw' => $_POST['publish_tw'], 'publish_fbp' => $_POST['publish_fbp'], 'publish_group' => $_POST['publish_group']);
            if (is_array($fields = makeTimes($fields))) {
                if ($hdb->doInsert($table, $fields)) {
                    $return = array("e" => 0);
                } else {
                    $return = array("e" => 2);
開發者ID:darwinv,項目名稱:sambilnew,代碼行數:31,代碼來源:add_sch_message.php

示例5: json_encode

<?php

require_once "../../clases/bd.php";
$db = new bd();
session_start();
$uid = $_SESSION['id'];
$pid = $db->quote($_POST['id']);
$tw = $_POST['tw'] == 1 ? 1 : 0;
$fb = $_POST['fb'] == 1 ? 1 : 0;
$fbp = $_POST['fbp'] == 1 ? 1 : 0;
$gp = $_POST['gp'] == 1 ? 1 : 0;
$des = $_POST['des'];
$tabla = "publicaciones";
$fields = array("publicar_twitter" => $tw, "publicar_facebook" => $fb, "publicar_fanpage" => $fbp, "publicar_grupo" => $gp, "manager_des" => $des);
if ($db->doUpdate($tabla, $fields, " id={$pid} AND usuarios_id={$uid} ")) {
    $return = array("e" => 0);
} else {
    $return = array("e" => 1);
}
echo json_encode($return);
開發者ID:darwinv,項目名稱:vogues,代碼行數:20,代碼來源:change_pub_targets.php


注:本文中的bd::quote方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。