'; if (! empty($title)) { echo '' . stripslashes($title) . ' - ' . NOMAPPLICATION . ''; } else { echo '' . NOMAPPLICATION . ''; } echo ' '; if (file_exists($_SERVER['DOCUMENT_ROOT']."/nav/nav.js")) { echo ''; } echo '
'; } /** * Check if an email address is valid using PHP filters * * @param string $email Email address to check * @return bool True if valid. False if not valid. * @deprecated */ public static function isValidEmail($email) { return filter_var($email, FILTER_VALIDATE_EMAIL); } /** * Fonction permettant de générer les URL pour les sondage * @param string $id L'identifiant du sondage * @param bool $admin True pour générer une URL pour l'administration d'un sondage, False pour un URL publique * @return string L'url pour le sondage */ public static function getUrlSondage($id, $admin = false) { if (URL_PROPRE) { if ($admin === true) { $url = str_replace('/admin', '', self::get_server_name()) . $id . '/admin'; } else { $url = str_replace('/admin', '', self::get_server_name()) . $id; } } else { if ($admin === true) { $url = str_replace('/admin', '', self::get_server_name()) . 'adminstuds.php?poll=' . $id; } else { $url = str_replace('/admin', '', self::get_server_name()) . 'studs.php?poll=' . $id; } } return $url; } /** * This method pretty prints an object to the page framed by pre tags. * @param mixed $object The object to print. */ public static function debug($object) { echo '
';
        print_r($object);
        echo '
'; } public static function table($tableName) { return TABLENAME_PREFIX . $tableName; } }