当前位置: 首页>>代码示例>>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;未经允许,请勿转载。