示例#1
0
    }
    if (isset($errors)) {
        $errortitle = '添加群组错误';
        $action = 'default';
    } else {
        $DB->exe("INSERT INTO " . TABLE_PREFIX . "usergroup (displayorder, groupname, groupename, activated, description, descriptionen) VALUES (1, '{$groupname}', '{$groupename}', 1, '{$description}', '{$descriptionen}')");
        $usergroupid = $DB->insert_id();
        $DB->exe("UPDATE " . TABLE_PREFIX . "usergroup SET displayorder = '{$usergroupid}' WHERE usergroupid = '{$usergroupid}'");
        GotoPage('admin.groups.php', 1);
    }
}
//########### PRINT DEFAULT ###########
if ($action == 'default') {
    $usergroup = array('groupname' => '', 'groupename' => '', 'description' => '', 'descriptionen' => '');
    if (isset($errors)) {
        PrintErrors($errors, $errortitle);
        if (!IsPost('updategroups')) {
            $usergroup = array('groupname' => $groupname, 'groupename' => $groupename, 'description' => $_POST['description'], 'descriptionen' => $_POST['descriptionen']);
        }
    }
    echo '<form method="post" action="admin.groups.php" name="groupform">
	<input type="hidden" name="action" value="creatgroup">
	<table border="0" cellpadding="0" cellspacing="0" class="moreinfo">
	<thead>
	<tr>
	<th colspan="4">创建新客服群组:</th>
	</tr>
	</thead>
	<tbody>
	<tr>
	<td>客服群组的名称:</td>
示例#2
0
/*
D I S C L A I M E R                                                                                          
WARNING: ANY USE BY YOU OF THE SAMPLE CODE PROVIDED IS AT YOUR OWN RISK.                                                                                   
Authorize.Net provphpides this code "as is" without warranty of any kind, either express or implied, including but not limited to the implied warranties of merchantability and/or fitness for a particular purpose.
Authorize.Net owns and retains all right, title and interest in and to the Automated Recurring Billing intellectual property.
*/
include_once "vars.php";
include_once "api_authorize_net_soap_v1.php";
include_once "util.php";
echo "Cancel subscription <b>" . htmlspecialchars($_POST["subscriptionId"]) . "</b>...<br><br>";
$ws = CreateWSClient();
$req = new ARBCancelSubscription();
$req->merchantAuthentication = PopulateMerchantAuthentication();
$req->subscriptionId = $_POST["subscriptionId"];
try {
    $response = $ws->ARBCancelSubscription($req);
    //echo "Raw request: " . htmlspecialchars($ws->__getLastRequest()) . "<br><br>";
    //echo "Raw response: " . htmlspecialchars($ws->__getLastResponse()) . "<br><br>";
    if ("Ok" == $response->ARBCancelSubscriptionResult->resultCode) {
        echo "Subcription ID <b>" . htmlspecialchars($_POST["subscriptionId"]) . "</b> was successfully cancelled.<br><br>";
    } else {
        echo "The operation failed with the following errors:<br>";
        PrintErrors($response->ARBCancelSubscriptionResult);
    }
} catch (SoapFault $exception) {
    echo $exception . "<br><br>";
}
echo "<br><a href=index.php?subscriptionId=" . urlencode($_POST["subscriptionId"]) . ">Continue</a><br>";
?>

示例#3
0
define('AUTH', true);
include 'includes/welive.Core.php';
include BASEPATH . 'includes/welive.Admin.php';
if ($userinfo['usergroupid'] != 1) {
    exit;
}
$action = ForceIncomingString('action', 'displaysettings');
PrintHeader($userinfo['username'], 'settings');
//########### UPDATE SETTINGS ###########
if ($action == 'updatesettings') {
    $filename = BASEPATH . "config/settings.php";
    if (!is_writeable($filename)) {
        $errors = '请将系统配置文件config/settings.php设置为可写, 即属性设置为: 777';
    }
    if (isset($errors)) {
        PrintErrors($errors, '系统设置错误');
        $action = 'displaysettings';
    } else {
        $settings = $_POST['settings'];
        $fp = @fopen($filename, 'rb');
        $contents = @fread($fp, filesize($filename));
        @fclose($fp);
        $contents = trim($contents);
        $oldcontents = $contents;
        foreach ($settings as $key => $value) {
            if ($_CFG[$key] != $settings[$key]) {
                switch ($key) {
                    case 'cKillRobotCode':
                        $value = ForceString($value, $_CFG[$key]);
                        break;
                    case 'cUpdate':
示例#4
0
/*
D I S C L A I M E R                                                                                          
WARNING: ANY USE BY YOU OF THE SAMPLE CODE PROVIDED IS AT YOUR OWN RISK.                                                                                   
Authorize.Net provphpides this code "as is" without warranty of any kind, either express or implied, including but not limited to the implied warranties of merchantability and/or fitness for a particular purpose.
Authorize.Net owns and retains all right, title and interest in and to the Automated Recurring Billing intellectual property.
*/
include_once "vars.php";
include_once "api_authorize_net_soap_v1.php";
include_once "util.php";
echo "Create subscription...<br><br>";
$ws = CreateWSClient();
$req = new ARBCreateSubscription();
$req->merchantAuthentication = PopulateMerchantAuthentication();
$req->subscription = PopulateSubscription($_POST["amount"], FALSE);
try {
    $response = $ws->ARBCreateSubscription($req);
    //echo "Raw request: " . htmlspecialchars($ws->__getLastRequest()) . "<br><br>";
    //echo "Raw response: " . htmlspecialchars($ws->__getLastResponse()) . "<br><br>";
    if ("Ok" == $response->ARBCreateSubscriptionResult->resultCode) {
        echo "Subcription ID <b>" . htmlspecialchars($response->ARBCreateSubscriptionResult->subscriptionId) . "</b> was successfully created.<br><br>";
    } else {
        echo "The operation failed with the following errors:<br>";
        PrintErrors($response->ARBCreateSubscriptionResult);
    }
} catch (SoapFault $exception) {
    echo $exception . "<br><br>";
}
echo "<br><a href=index.php?subscriptionId=" . urlencode($response->ARBCreateSubscriptionResult->subscriptionId) . ">Continue</a><br>";
?>