コード例 #1
0
		of the decimal point. The price can be negative (to give a discount)
		by inserting a dash/hyphen/minus sign between the pipe characters and
		the first digit.</p>
	<p>If you want a particular option to have no price attached to it (only some
		options cost more), you can either set the price to 0.00 (a price of
		0.00 will be displayed) or follow the pipe characters with a dash/hyphen
		(no price will be displayed). If any option in the field has a price, <em>all</em> lines
		must have the pipe characters at the end (whether there is a price attatched
		or not). If any value has omitted the pipe characters, all subsequent
		prices will be shifted up one value.</p>
	<p>Do not include a currency symbol &#150; it will be added automatically based
		on settings on the <em>General Settings</em> page.</p>
<?php 
} else {
    // retrieve conference settings
    $settings = get_Conference_Settings();
    // define types of edits
    $levelType = array(0 => "none", 1 => "group", 2 => "field");
    // define types of fields
    $fieldType = array(1 => "plain text", 2 => "text field (single line)", 3 => "text field (multiple lines)", 4 => "checkbox", 5 => "checkbox group", 6 => "radio button", 7 => "radio button group", 8 => "drop-down menu", 9 => "selectable list");
    // define types of validation functions
    $valFunctions = array(11 => "numeric only", 12 => "numeric only (including spaces and dashes)", 13 => "phone number (characters and basic syntax)", 14 => "email address (syntax only)", 15 => "web site/page (syntax only)", 21 => "registered username", 22 => "registered author", 23 => "registered paper name", 31 => "credit card number", 32 => "credit card expiry date");
    // check $_POST to see if form has been submitted (for edits)
    if (count($_POST) > 0) {
        // get action
        $pos = strpos($_POST['action'], " ");
        if ($pos === false) {
            $action = strtolower($_POST['action']);
        } else {
            $action = substr(strtolower($_POST['action']), 0, $pos);
        }
コード例 #2
0
ファイル: view_abstract.php プロジェクト: alexzita/alex_blog
    //		echo $_SERVER["HTTP_REFERER"] ;
    $_POST["referer"] = $_SERVER["HTTP_REFERER"];
}
$papers_str = "";
if ($_POST["papers"]) {
    foreach ($_POST["papers"] as $some => $postpaperid) {
        $papers_str .= "<input type=\"hidden\" value=\"" . $postpaperid . "\" name=\"papers[]\">\n";
    }
}
$storepapers_str = "";
if ($_POST["storepapers"]) {
    foreach ($_POST["storepapers"] as $some => $id) {
        $storepapers_str .= "<input type=\"hidden\" value=\"" . $id . "\" name=\"storepapers[]\">\n";
    }
}
$settingInfo = get_Conference_Settings();
do_html_header("View Abstract", &$err_message);
?>
<br>
<form name="frmPaper" method="post" action="<?php 
echo $_POST["referer"];
?>
">
<table width="100%" border="0" cellspacing="0" cellpadding="1">
  <tr>
    <td align="center"><h3>#<?php 
echo $paperInfo->PaperID;
?>
&nbsp;&nbsp;<?php 
echo stripslashes($paperInfo->Title);
?>
コード例 #3
0
function isValidLogoFile(&$file, $error_array = array(), $index = 0, $array_key = NULL)
{
    static $hasvalue = "false";
    switch ($array_key) {
        case "name":
            $hasvalue = "true";
            break;
        case "type":
            if ($file == "image/jpeg" || $file == "image/pjpeg" || $file == "image/x-png" || $file == "image/png") {
            } else {
                $error_array[$index] = " This \"{$file}\" file type is not supported.<br>\n";
                return false;
            }
            break;
        case "tmp_name":
            break;
        case "size":
            if ($file == 0 && $hasvalue == "true") {
                //		echo "Failed \$string: " . $string . " <br>\n" ;
                $error_array[$index] = " Please upload a valid file.<br>\n";
                return false;
            } else {
                $err_message =& $GLOBALS["err_message"];
                if (($setobj = get_Conference_Settings(&$err_message)) === NULL) {
                    // global $_SERVER ;
                    do_html_header("Data Validation Failed", &$err_message);
                    $err_message .= " Could not execute \"get_Conference_Settings\" in \"data_validation_fns.php\". <br>\n";
                    $err_message .= "<br><br> Try <a href='" . $_SERVER["PHP_SELF"] . "?" . $_SERVER["QUERY_STRING"] . "'>again</a>?";
                    do_html_footer(&$err_message);
                    exit;
                }
                $maxfilesize = intval(ini_get("upload_max_filesize")) * 1000000;
                if ($setobj) {
                    $maxfilesize = $setobj->MaxLogoSize;
                }
                if ($file > $maxfilesize) {
                    $error_array[$index] = " Please keep file size to the limit of {$maxfilesize} bytes.<br>\n";
                    return false;
                    break;
                }
                return true;
            }
            break;
        case "error":
            if ($file == 2) {
                $error_array[$index] = " Please keep file size under the limit.<br>\n";
                return false;
            } else {
                return true;
            }
            break;
        default:
            break;
    }
}