コード例 #1
0
ファイル: details.php プロジェクト: sebastiendu/mmc
    } else {
        $browseable = 0;
    }
    if (!preg_match("/^[a-zA-Z][a-zA-Z0-9.]*\$/", $shareName)) {
        new NotifyWidgetFailure(_T("Invalid share name"));
    } else {
        $add = True;
        if (strlen($sharePath)) {
            if (!isAuthorizedSharePath($sharePath)) {
                new NotifyWidgetFailure(_T("The share path is not authorized by configuration"));
                $add = False;
            }
        }
        if ($add) {
            $params = array($shareName, $sharePath, $shareDesc, $shareGroup, $shareUser, $permAll, $adminGroups, $browseable, $av, $customParameters);
            add_share($params);
            if (!isXMLRPCError()) {
                new NotifyWidgetSuccess(sprintf(_T("Share %s successfully added"), $shareName));
                header("Location: " . urlStrRedirect("samba/shares/index"));
                exit;
            }
        }
    }
}
if (isset($_POST["bmodify"])) {
    $share = $_GET["share"];
    $shareName = $_POST["shareName"];
    $sharePath = $_POST["sharePath"];
    $shareDesc = $_POST["shareDesc"];
    if (isset($_POST["groupgroupsselected"])) {
        $shareGroup = $_POST["groupgroupsselected"];
コード例 #2
0
ファイル: add_share.php プロジェクト: omusico/wildfire_php
<?php

require_once "../comm/qqconfig.php";
require_once "../comm/utils.php";
function add_share()
{
    //发布一条动态的接口地址, 不要更改!!
    $url = "https://graph.qq.com/share/add_share?" . "access_token=" . $_SESSION["access_token"] . "&oauth_consumer_key=" . $_SESSION["appid"] . "&openid=" . $_SESSION["openid"] . "&format=json" . "&title=" . urlencode($_REQUEST["title"]) . "&url=" . urlencode($_REQUEST["url"]) . "&comment=" . urlencode($_REQUEST["comment"]) . "&summary=" . urlencode($_REQUEST["summary"]) . "&images=" . urlencode($_REQUEST["images"]);
    //echo $url;
    $ret = get_url_contents($url);
}
//接口调用示例:
$ret = add_share();
echo $ret;
コード例 #3
0
 /**
  * qqzone发布一条动态
  */
 public function addQQZoneFeed($bindinfo, $params)
 {
     $_SESSION['qqzone']['access_token'] = $bindinfo['snsbind_accesstoken'];
     $_SESSION['qqzone']['appid'] = C('share_qqzone_appid');
     $_SESSION['qqzone']['openid'] = $bindinfo['snsbind_openid'];
     include_once BasePath . DS . 'api' . DS . 'snsapi' . DS . 'qqzone' . DS . 'share' . DS . 'add_share.php';
     add_share($params);
 }