* destruction, a second on the date.
*/
require 'connect.db.inc.php';
-require_once 'validations/homonymes.inc.php';
$resRobot = XDB::iterator("SELECT uid, alias, expire
FROM aliases
<?php
require_once dirname(__FILE__) . '/connect.db.inc.php';
-require_once 'validations.inc.php';
global $globals;
} else if (substr($cls, 0, 3) == 'de_') {
__autoload('direnum');
return;
- } else if (substr($cls, -3, 3) == 'req') {
- include 'validations.inc.php';
+ } else if ($cls == 'validate' || substr($cls, -3, 3) == 'req'
+ || substr($cls, -8, 8) == 'validate' || substr($cls, 0, 8) == 'validate') {
+ require_once 'validations.inc.php';
return;
} else if (substr($cls, 0, 6) == 'banana') {
require_once 'banana/hooks.inc.php';
// validation queue.
private function load_pending_validations()
{
- require_once('validations.inc.php');
$this->pending_validation_unsuspend =
Validate::get_typed_requests_count($this->user->id(), 'gapps-unsuspend');
}
}
if (!$this->pending_update_suspension && !$this->pending_validation_unsuspend) {
- require_once('validations.inc.php');
$unsuspend = new GoogleAppsUnsuspendReq($this->user);
$unsuspend->submit();
$this->pending_validation_unsuspend = true;
$this->type, $this->data, $this->personal_notes);
$this->engine->process($this->user);
if ($valid) {
- require_once 'validations.inc.php';
$sender = User::getSilent($this->sender);
$valid = new MarkReq($sender, $this->user['user'], $this->user['mail'],
$this->from == 'user', $this->type, $this->data, $this->personal_notes);
}
$this->company = CompanyList::get($this->jobid);
if (is_null($this->company)) {
- require_once 'validations.inc.php';
$entreprise = ProfileValidate::get_typed_requests($this->pid, 'entreprise');
$this->company = new Company(array('name' => $entreprise[$this->id]->name));
}
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
***************************************************************************/
-require_once 'validations.inc.php';
// {{{ class HomonymeReq
class HomonymeReq extends Validate
$page->setTitle('Administration - Valider une demande');
$page->addCssLink('nl.css');
$page->addJsLink('ajax.js');
- require_once 'validations.inc.php';
if ($action == 'edit' && !is_null($id)) {
$page->assign('preview_id', $id);
function handler_alias(&$page, $action = null, $value = null)
{
- require_once 'validations.inc.php';
-
global $globals;
$page->changeTpl('emails/alias.tpl');
exit;
}
} elseif ($eid == 'valid') {
- require_once 'validations.inc.php';
$valid = Validate::get_request_by_id($valid);
if ($valid && $valid->img) {
pl_cached_dynamic_content_headers("image/" . $valid->imgtype);
} elseif ($action) {
S::assert_xsrf_token();
- require_once 'validations.inc.php';
$evtreq = new EvtReq($titre, $texte, $promo_min, $promo_max,
$expiration, $valid_mesg, S::user(), $upload);
$evtreq->submit();
if (!$page->nb_errs()) {
$page->trigSuccess('Demande de création envoyée !');
$page->assign('created', true);
- require_once 'validations.inc.php';
$req = new ListeReq(S::user(), $asso, $liste, $domain,
Post::v('desc'), Post::i('advertise'),
Post::i('modlevel'), Post::i('inslevel'),
$page->trigError("Il faut que tu ajoutes un commentaire à ta proposition pour justifier le "
. "besoin de changer la redirection de {$user->fullName()}.");
} else {
- require_once 'validations.inc.php';
$valid = new BrokenReq(S::user(), $user, $email, trim(Post::v('comment')));
$valid->submit();
$page->assign('sent', true);
$art = new NLArticle(Post::v('title'), Post::v('body'), Post::v('append'));
$page->assign('art', $art);
} elseif (Post::has('valid')) {
- require_once('validations.inc.php');
$art = new NLReq(S::user(), Post::v('title'),
Post::v('body'), Post::v('append'));
$art->submit();
// Retrieve the photo and its mime type.
if ($req && S::logged()) {
- include 'validations.inc.php';
$myphoto = PhotoReq::get_request($profile->id());
$photo = PlImage::fromData($myphoto->data, $myphoto->mimetype);
} else {
$page->changeTpl('profile/trombino.tpl');
$page->assign('hrpid', $profile->hrid());
- require_once('validations.inc.php');
-
$trombi_x = '/home/web/trombino/photos' . $profile->promo() . '/' . $profile->hrid() . '.jpg';
if (Env::has('upload')) {
S::assert_xsrf_token();
}
// Fetch not yet validated medals
- require_once 'validations.inc.php';
$medals = ProfileValidate::get_typed_requests($page->pid(), 'medal');
foreach ($medals as &$medal) {
$value[$medal->mid] = array('grade' => $medal->gid,
public function save(ProfilePage &$page, $field, $value)
{
- require_once 'validations.inc.php';
-
$orig =& $page->orig[$field];
// Remove old ones
$value[] = $sn;
} while ($sn = $sn_all->next());
}
- require_once 'validations.inc.php';
$namesRequest = ProfileValidate::get_typed_requests($page->pid(), 'usage');
if (count($namesRequest) > 0) {
Platal::page()->assign('validation', true);
public function save(ProfilePage &$page, $field, $value)
{
require_once 'name.func.inc.php';
- require_once 'validations.inc.php';
$sn_old = build_sn_pub($page->pid());
XDB::execute("DELETE FROM s
$gradYearNew, $page->profile->id());
Platal::page()->trigSuccess('Ton statut « orange » a été supprimé.');
} else {
- require_once 'validations.inc.php';
-
$myorange = new OrangeReq(S::user(), $page->profile, $gradYearNew);
$myorange->submit();
Platal::page()->trigSuccess('Tu pourras changer l\'affichage de ta promotion dès que ta nouvelle promotion aura été validée.');
public function value(ProfilePage &$page, $field, $value, &$success)
{
- require_once 'validations.inc.php';
$entreprise = ProfileValidate::get_typed_requests($page->pid(), 'entreprise');
$entr_val = 0;
// {{{ static function retrieveSurveyReq() : gets a survey request to validate
public static function retrieveSurveyReq($id)
{
- require_once 'validations.inc.php';
$surveyreq = Validate::get_request_by_id($id);
if ($surveyreq == null) {
return null;
// {{{ function proposeSurvey() : stores a proposition of survey in database (before validation)
public function proposeSurvey()
{
- require_once 'validations.inc.php';
$surveyreq = new SurveyReq($this->title, $this->description, $this->end, $this->mode, $this->promos, $this->questions, S::user());
return $surveyreq->submit();
}
WHERE id={?};';
return XDB::execute($sql, serialize($this->questions), $this->title, $this->description, $this->end, $this->mode, $this->promos, $this->id);
} else {
- require_once 'validations.inc.php';
$surveyreq = Validate::get_request_by_id($this->id);
if ($surveyreq == null) {
return false;
$eid, $globals->asso('id'));
// delete the requests for payments
- require_once 'validations.inc.php';
XDB::execute("DELETE FROM requests
WHERE type = 'paiements' AND data LIKE {?}",
PayReq::same_event($eid, $globals->asso('id')));
}
// request for a new payment
if (Post::v('paiement_id') == -1 && $money_defaut >= 0) {
- require_once 'validations.inc.php';
$p = new PayReq(S::user(),
Post::v('intitule')." - ".$globals->asso('nom'),
Post::v('site'), $money_defaut,
WHERE eid = {?}", $eid);
$evt = $res->fetchOneAssoc();
// find out if there is already a request for a payment for this event
- require_once 'validations.inc.php';
$res = XDB::query("SELECT stamp
FROM requests
WHERE type = 'paiements' AND data LIKE {?}",
$aid, $imgtype, $imgx, $imgy, $upload->getContents());
}
if ($art['xorg']) {
- require_once('validations.inc.php');
$article = new EvtReq("[{$globals->asso('nom')}] " . $art['titre'], $fulltext,
$art['promo_min'], $art['promo_max'], $art['expiration'], "", S::user(),
$upload);
$upload->rm();
}
if ($art['nl']) {
- require_once('validations.inc.php');
$article = new NLReq(S::user(), $globals->asso('nom') . " : " .$art['titre'],
$art['texte'], $art['contact_html']);
$article->submit();