Beispiel #1
0
echo 'border-width:1px;" alt="" name="order" value="des_notification" onclick="this.form.order.value = this.value"/>';
echo '</span>';
echo '<br/>';
echo 'Notification';
echo '<br />';
echo "<select name=\"filter_statut_notification\" onchange='submit()'>";
echo "<option value=''></option>\n";
echo "<option value='SANS'";
if (getFiltreRechercheParam('filter_statut_notification') == 'SANS') {
    echo " selected='selected' ";
}
echo ">";
echo 'SANS NOTIFICATION';
echo "</option>\n";
$i = 0;
foreach (AbsenceEleveNotificationPeer::getValueSet(AbsenceEleveNotificationPeer::STATUT_ENVOI) as $status) {
    echo "<option value='{$status}'";
    if (getFiltreRechercheParam('filter_statut_notification') === $status) {
        echo 'selected';
    }
    echo ">" . $status . "</option>\n";
}
echo "</select>";
echo '</th>';
//en tete filtre date creation
echo '<th>';
echo '<span style="white-space: nowrap;"> ';
//echo '<nobr>';
echo 'Date création';
echo '<input type="image" src="../images/up.png" title="monter" style="vertical-align: middle;width:15px; height:15px; ';
if ($order == "asc_date_creation") {
	/**
	 * Filter the query on the statut_envoi column
	 *
	 * @param     mixed $statutEnvoi The value to use as filter
	 * @param     string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
	 *
	 * @return    AbsenceEleveNotificationQuery The current query, for fluid interface
	 */
	public function filterByStatutEnvoi($statutEnvoi = null, $comparison = null)
	{
		$valueSet = AbsenceEleveNotificationPeer::getValueSet(AbsenceEleveNotificationPeer::STATUT_ENVOI);
		if (is_scalar($statutEnvoi)) {
			if (!in_array($statutEnvoi, $valueSet)) {
				throw new PropelException(sprintf('Value "%s" is not accepted in this enumerated column', $statutEnvoi));
			}
			$statutEnvoi = array_search($statutEnvoi, $valueSet);
		} elseif (is_array($statutEnvoi)) {
			$convertedValues = array();
			foreach ($statutEnvoi as $value) {
				if (!in_array($value, $valueSet)) {
					throw new PropelException(sprintf('Value "%s" is not accepted in this enumerated column', $value));
				}
				$convertedValues []= array_search($value, $valueSet);
			}
			$statutEnvoi = $convertedValues;
			if (null === $comparison) {
				$comparison = Criteria::IN;
			}
		}
		return $this->addUsingAlias(AbsenceEleveNotificationPeer::STATUT_ENVOI, $statutEnvoi, $comparison);
	}
Beispiel #3
0
	<tr>
		<td>
			Notification : 
		</td>
		<td>
			<table style='background-color:#c7e3ec;'>
				<tr>
					<td>
						Type de notification : 
					</td>
					<td>
						<p>
							<select name=\"type_notification\" onchange='changement()'>
								<option value=''>Aucune</option>";

foreach (AbsenceEleveNotificationPeer::getValueSet(AbsenceEleveNotificationPeer::TYPE_NOTIFICATION) as $type) {
	if ($type === AbsenceEleveNotificationPeer::TYPE_NOTIFICATION_SMS && (getSettingValue("abs2_sms") != 'y')) {
		//pas d'option sms
	}
	else {
		echo "
								<option value='$type' id='type_notification_".preg_replace("/[^A-zA-z0-9]/", "_", $type)."'>".$type."</option>";
	}
}
echo "
							</select>
						</p>
					</td>
				</tr>
				<tr>
					<td colspan='2'>
	/**
	 * Sets a field from the object by Position as specified in the xml schema.
	 * Zero-based.
	 *
	 * @param      int $pos position in xml schema
	 * @param      mixed $value field value
	 * @return     void
	 */
	public function setByPosition($pos, $value)
	{
		switch($pos) {
			case 0:
				$this->setId($value);
				break;
			case 1:
				$this->setUtilisateurId($value);
				break;
			case 2:
				$this->setATraitementId($value);
				break;
			case 3:
				$valueSet = AbsenceEleveNotificationPeer::getValueSet(AbsenceEleveNotificationPeer::TYPE_NOTIFICATION);
				if (isset($valueSet[$value])) {
					$value = $valueSet[$value];
				}
				$this->setTypeNotification($value);
				break;
			case 4:
				$this->setEmail($value);
				break;
			case 5:
				$this->setTelephone($value);
				break;
			case 6:
				$this->setAdresseId($value);
				break;
			case 7:
				$this->setCommentaire($value);
				break;
			case 8:
				$valueSet = AbsenceEleveNotificationPeer::getValueSet(AbsenceEleveNotificationPeer::STATUT_ENVOI);
				if (isset($valueSet[$value])) {
					$value = $valueSet[$value];
				}
				$this->setStatutEnvoi($value);
				break;
			case 9:
				$this->setDateEnvoi($value);
				break;
			case 10:
				$this->setErreurMessageEnvoi($value);
				break;
			case 11:
				$this->setCreatedAt($value);
				break;
			case 12:
				$this->setUpdatedAt($value);
				break;
		} // switch()
	}