示例#1
0
	function load_all() {
		$ok = true;
		$imap_keys   = CTableEmail::get_imapkeys();
		$mails_users = CTableUser::get_array_email();
		$nb_msg = $this->get_nb_msg();
		$sql_0 = "INSERT INTO email(id, nom, text, expediteur, destinataire, date, imap) VALUES ";
		$sql_1 = "";
		for($i=$nb_msg; $i>=1 ; $i--) {
			$info = $this->get_info($i);
			if(in_array($info['from'], $mails_users) && !in_array($info['message_id'], $imap_keys)) {
				$res = $this->load($i);
				$ok = $ok && $res;
			}
		}
		return $ok;
	}
示例#2
0
              <label>Relever les</label>
              <input name="nb_traitement" type="text" id="nb_traitement" value="<?php echo $nb_traitement ?>"/> 
              derniers messages ( Par d&eacute;faut et Maximum : <?php echo MAIL_MAX_RECEPT ?>)
            </p>
            <p>
              <input name="creer" type="submit" value="Relever >>"/>
            </p>
          </fieldset>
        </form>
<?php } ?>

<?php if($a==44) { 
		for($i = $nb_msg; $i >= $nb_msg - $nb_traitement; $i--) { ?>
			<script type="text/javascript">$('over').innerHTML = "Acc&egrave;s au message <?php echo $i ?>";</script><?php    
			$mails_users = CTableUser::get_array_email();
			$imap_keys   = CTableEmail::get_imapkeys();
			$info = $imap->get_info($i);
			if(in_array($info['from'], $mails_users) && !in_array($info['message_id'], $imap_keys)) { ?>
		<script type="text/javascript">
				$('over').innerHTML = "Demande de sauvegarde du message <?php echo $i ?>";
				new Ajax.Updater('over', 'load_mail.php?passe=<?php echo $passe ?>&message_number=<?php echo $i ?>', {evalScripts:true});
				</script><?php
			} else { ?>
		<script type="text/javascript">$('over').innerHTML = "Rien &agrave; faire pour le message <?php echo $i ?>";</script><?php
			}
		}
		$imap->close();
} ?>
        </div>
    </div>
    <hr class="clearfloat" />