function validate(&$key, &$value, $error_array = array(), $index = 0, $array_key = NULL)
{
    //	echo "Switch Test \$key: " . $key . " \$value: " . $value . " <br>\n" ;
    switch ($key) {
        case "numauthors":
        case "numpages":
            //			echo "Switch Number \$key: " . $key . " \$value: " . $value . " <br>\n" ;
            isIntegerMoreThanZero($value, &$error_array, &$index);
            break;
        case "email":
        case "emailHome":
        case "ConferenceContact":
            //			echo "Switch Email \$key: " . $key . " \$value: " . $value . " <br>\n" ;
            valid_email($value, &$error_array, &$index);
            break;
        case "faxno":
        case "phoneno":
            //			echo "Switch Phone \$key: " . $key . " \$value: " . $value . " <br>\n" ;
            isValidPhoneNumber($value, &$error_array, &$index);
            break;
        case "phonenoHome":
            //			echo "Switch Phone \$key: " . $key . " \$value: " . $value . " <br>\n" ;
            isValidPhoneNumber($value, &$error_array, &$index);
            break;
        case "userfile":
        case "state":
        case "commentfile":
            //			echo "Switch File \$key: " . $key . " \$value: " . $value . " <br>\n" ;
            isValidFile($value, &$error_array, &$index, &$array_key);
            break;
        case "logofile":
            isValidLogoFile($value, &$error_array, &$index, &$array_key);
            break;
        case "country":
            isValidCountryCode($value, &$error_array, &$index);
            break;
        case "password":
        case "newpwd":
            isValidPassword($value, &$error_array, &$index);
            break;
        case "date":
        case "ConferenceStartDate":
        case "ConferenceEndDate":
        case "arrStartDate":
        case "arrEndDate":
            if (isValidDate($value, &$error_array, &$index)) {
                //is_date_expired( $value , date ( "j/m/Y" , time() ) , &$error_array , &$index ) ;
                is_date_expired($value, date("Y-m-d", time()), &$error_array, &$index);
            }
            break;
        default:
            //			echo "Default \$key: " . $key . " \$value: " . $value . " <br>\n" ;
            break;
    }
}
Example #2
0
echo $valid_user;
?>
</strong>!</td>
  </tr>
  <tr> 
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <tr> 
    <td>&nbsp;</td>
    <td><table width="60%" border="1" cellpadding="3" cellspacing="0" bordercolor="#999999">
        <tr> 
          <td colspan="2"> 
            <?php 
if ($currentPhaseInfo != false) {
    $result = is_date_expired($currentPhaseInfo->EndDate, date("Y-m-d", time()), &$err_message, "date");
    if ($result === true) {
        ?>
                    <font color='#FF0000'>The current running phase is expired.</font><br>
                    <br><font color='#FF0000'>
                    <?php 
    } else {
        ?>
                    
                    <?php 
    }
    ?>
				<strong>
                <?php 
    echo $currentPhaseInfo->PhaseName;
    ?>
Example #3
0
if (($phasesResult = getAllPhases(&$err_message)) === NULL) {
    do_html_header("View Phases Failed", &$err_message);
    $err_message .= " Could not execute \"getAllPhases\" in \"view_phases.php\". <br>\n";
    $err_message .= "<br><br> Try <a href='" . $_SERVER["PHP_SELF"] . "?" . $_SERVER['QUERY_STRING'] . "'>again</a>?";
    do_html_footer(&$err_message);
    exit;
}
// Get settings info
$settingsInfo = get_Conference_Settings();
?>
<form name="form1" method="post" action="">
  <table width="100%" border="0" cellspacing="0" cellpadding="1">
    <?php 
if ($currentPhaseInfo != false) {
    // matches } noted below
    $result = is_date_expired($currentPhaseInfo->EndDate, format_date(), &$err_message, "date");
    ?>
    <tr> 
      <td> 
        <?php 
    if ($result === true) {
        echo "<font color='#FF0000'>The current running phase is already expired. It is time to change to the next phase.</font>";
    }
    ?>
      </td>
    </tr>
    <tr> 
      <td>&nbsp;</td>
    </tr>
    <tr> 
      <td><strong>