コード例 #1
0
ファイル: linkpoint.php プロジェクト: gblok/rsc
function settingCONF_LINKPOINT_INTEGRATION($_SettingID)
{
    $SettingConstName = settingGetConstNameByID($_SettingID);
    if (isset($_POST["save"])) {
        if (isset($_POST['setting' . $SettingConstName])) {
            _setSettingOptionValueByID($_SettingID, $_POST['setting' . $SettingConstName]);
        }
    }
    $res = "";
    $currencies = currGetAllCurrencies();
    $res = "<select name='setting" . $SettingConstName . "'>";
    $selectedID = _getSettingOptionValueByID($_SettingID);
    $res .= "<option value='1'";
    if ((int) $selectedID == 1) {
        $res .= " selected";
    }
    $res .= ">" . CLINKPOINT_TXT_1 . "</option>";
    $res .= "<option value='2'";
    if ((int) $selectedID == 2) {
        $res .= " selected";
    }
    $res .= ">" . CLINKPOINT_TXT_2 . "</option>";
    $res .= "<option value='3'";
    if ((int) $selectedID == 3) {
        $res .= " selected";
    }
    $res .= ">" . CLINKPOINT_TXT_3 . "</option>";
    $res .= "</select>";
    return $res;
}
コード例 #2
0
ファイル: class.courier2.php プロジェクト: gblok/rsc
 function setting_ZONE_SELECT($_CountryID, $_SettingID)
 {
     $Zones = znGetZones($_CountryID);
     $Options = array(array("title" => STR_ANY_ZONE, "value" => 0));
     if (!count($Zones) && $_CountryID) {
         setting_SELECT_BOX($Options, $_SettingID);
         return STR_ZONES_NOTDEFINED . '<input type="hidden" name="setting_' . settingGetConstNameByID($_SettingID) . '" value="0" />';
     }
     foreach ($Zones as $_Zone) {
         $Options[] = array("title" => $_Zone['zone_name'], "value" => $_Zone['zoneID']);
     }
     return setting_SELECT_BOX($Options, $_SettingID);
 }
コード例 #3
0
ファイル: setting_functions.php プロジェクト: gblok/rsc
function setting_SINGLE_FILE($_Path, $_SettingID)
{
    $Error = 0;
    $ConstantName = settingGetConstNameByID($_SettingID);
    if (isset($_POST['save']) && isset($_FILES['setting_' . $ConstantName])) {
        if ($_FILES['setting_' . $ConstantName]['name']) {
            if (@copy($_FILES['setting_' . $ConstantName]['tmp_name'], $_Path . '/' . $_FILES['setting_' . $ConstantName]['name'])) {
                _setSettingOptionValue($ConstantName, $_FILES['setting_' . $ConstantName]['name']);
            } else {
                $Error = 1;
            }
        }
    }
    $ConstantValue = _getSettingOptionValue($ConstantName);
    return ($Error ? '<div>' . ERROR_FAILED_TO_UPLOAD_FILE . '</div>' : '') . '<input type="file" name="setting_' . $ConstantName . '" /><br />' . ($ConstantValue ? $ConstantValue : '&nbsp;');
}