From: vincent@cubedesigners.com Date: Tue, 10 May 2011 08:58:06 +0000 (+0000) Subject: (no commit message) X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=00efce20574748418f901b1d2a4d3c9de1be1047;p=cubeextranet.git --- diff --git a/fluidbook/compile/_js/fluidbook.js b/fluidbook/compile/_js/fluidbook.js index dd619994b..7ad69ac65 100644 --- a/fluidbook/compile/_js/fluidbook.js +++ b/fluidbook/compile/_js/fluidbook.js @@ -91,12 +91,18 @@ function handleWheel(delta){ } } -function testIpadIphone(){ +function isMobile(){ var ua=navigator.userAgent; + var devices = ['iphone', 'ipad', 'ipod', 'android', 'blackberry', 'mobile', 'symbian', 'phone', 'nintendo', 'playstation']; + var pattern; - if(ua.search(/iphone/i)>-1 || ua.search(/ipad/i)>-1 || ua.search(/android/i)>-1){ - window.location='data/document.pdf'; + for(i=0;i-1){ + return true; + } } + return false; } function wheel(event){ diff --git a/fluidbook/compile/index.html b/fluidbook/compile/index.html index a085481c4..327b7bf0b 100644 --- a/fluidbook/compile/index.html +++ b/fluidbook/compile/index.html @@ -14,7 +14,12 @@ $redirectScript
$alt
- $ga diff --git a/inc/ws/Controlleur/class.ws.url.php b/inc/ws/Controlleur/class.ws.url.php index dac30e8b0..a93eabf52 100644 --- a/inc/ws/Controlleur/class.ws.url.php +++ b/inc/ws/Controlleur/class.ws.url.php @@ -1,7 +1,8 @@ user->getSettings('books'); @@ -18,7 +19,7 @@ class wsUrl { if (wsDroits::admin()) { $filtres[] = new commonFiltre(__('Administrateur'), 'admin_book', $settings['filtres']); } - $res = commonPage::barre($filtres , 'filtreBooks', 'books', $shortcuts); + $res = commonPage::barre($filtres, 'filtreBooks', 'books', $shortcuts); $res .= commonPage::tMain(null, wsDroits::admin()); $res .= commonPage::bh(); $res .= '
'; @@ -29,8 +30,7 @@ class wsUrl { return $res; } - public static function listeBooks($dashboard = null, $settings = null) - { + public static function listeBooks($dashboard = null, $settings = null) { global $core; cubePage::truePopup(); cubePage::autocomplete(); @@ -39,11 +39,11 @@ class wsUrl { $droits = wsDroits::getDroits(); commonDroits::min(1); - $settings = is_null($settings)?$core->user->getSettings('books'):$settings; - $change = is_null($dashboard)?'Books':'Dashboard/' . $dashboard; + $settings = is_null($settings) ? $core->user->getSettings('books') : $settings; + $change = is_null($dashboard) ? 'Books' : 'Dashboard/' . $dashboard; $dao = new wsDAOBook($core->con); - $context_download_id = is_null($dashboard)?'contextDownloadBook':'contextDashboard_Download' . $dashboard; - $context_status_id = is_null($dashboard)?'contextStatusBook':'contextDashboard_Status' . $dashboard; + $context_download_id = is_null($dashboard) ? 'contextDownloadBook' : 'contextDashboard_Download' . $dashboard; + $context_status_id = is_null($dashboard) ? 'contextStatusBook' : 'contextDashboard_Status' . $dashboard; if (isset($settings['search']) && !is_null($settings['search'])) { $dao->setSearch($settings['search']); @@ -72,7 +72,7 @@ class wsUrl { if ($droits->revendeur) { $res .= '' . commonUrl::orderby(__('Status'), 'status', $settings, 'sort' . $change) . ''; } - $res .= str_repeat('', $droits->creation?5:4); + $res .= str_repeat('', $droits->creation ? 5 : 4); $res .= ''; $i = 0; @@ -84,8 +84,8 @@ class wsUrl { $btDel = cubeMedia::cssRollover($core->typo->Supprimer('suppr.', '', false)); } - foreach($liste as $id => $book) { - $odd = cubeMath::isOdd($i)?' class="odd"':''; + foreach ($liste as $id => $book) { + $odd = cubeMath::isOdd($i) ? ' class="odd"' : ''; $res .= ''; $res .= '' . $book->book_id . ''; $res .= '' . html::escapeHTML($book->nom) . ''; @@ -125,9 +125,9 @@ class wsUrl { $i++; } if (!isset($settings['search']) || is_null($settings['search'])) { - $odd = cubeMath::isOdd($i)?' class="odd"':''; + $odd = cubeMath::isOdd($i) ? ' class="odd"' : ''; $res .= ''; - $res .= commonPage::pager($settings['page'], $dao->count($core->user) , $settings['par_page'], 'page' . $change . '/%d'); + $res .= commonPage::pager($settings['page'], $dao->count($core->user), $settings['par_page'], 'page' . $change . '/%d'); $res .= commonUrl::formParPage('parPage' . $change, $settings['par_page'], __('publications'), false); $res .= ''; } @@ -135,8 +135,7 @@ class wsUrl { return $res; } - public static function contextBookDownload($id) - { + public static function contextBookDownload($id) { global $core; $versions = array(); @@ -152,15 +151,14 @@ class wsUrl { $res = '
'; $res .= '
    '; $res .= '
  • ' . __("Sélectionnez une version") . '
  • '; - foreach($versions as $k => $v) { + foreach ($versions as $k => $v) { $res .= '
  • ' . $v['icon'] . $v['title'] . '
  • '; } $res .= '
'; return $res; } - public static function contextBookStatus($id) - { + public static function contextBookStatus($id) { global $core; if (wsDroits::admin()) { @@ -175,15 +173,14 @@ class wsUrl { $res = '
'; $res .= '
    '; $res .= '
  • ' . __("Changer le status de la publication") . '
  • '; - foreach($status as $s => $title) { + foreach ($status as $s => $title) { $res .= '
  • ' . $title . '
  • '; } $res .= '
'; return $res; } - public static function traductions($args) - { + public static function traductions($args) { global $core; commonDroits::min(5); @@ -197,7 +194,7 @@ class wsUrl { $dao = new wsDAOLang($core->con); $langs = $dao->selectAll(); - foreach($langs as $lang) { + foreach ($langs as $lang) { if (!isset($allLangs[$lang->lang_id])) { continue; } @@ -227,8 +224,7 @@ class wsUrl { return $res; } - public static function formLang($lang_id) - { + public static function formLang($lang_id) { commonDroits::min(5); global $core; $dao = new wsDAOLang($core->con); @@ -246,14 +242,13 @@ class wsUrl { $res .= commonPage::bf(); $res .= commonPage::bh(); - $res .= cubeLang::translationForm(PLAYER_SOURCES, $lang_id , null, 'liste', array(), '' . $core->typo->Ajouter(__('Enregistrer')) . '', $lang->traductions); + $res .= cubeLang::translationForm(PLAYER_SOURCES, $lang_id, null, 'liste', array(), '' . $core->typo->Ajouter(__('Enregistrer')) . '', $lang->traductions); $res .= commonPage::bf(); $res .= ''; return $res; } - public static function getFonts() - { + public static function getFonts() { $formats = array('ttf', 'otf', 'TTF', 'OTF'); $dr = opendir(FONT_PATH); @@ -267,18 +262,16 @@ class wsUrl { return $fonts; } - protected static function getCharsets() - { + protected static function getCharsets() { $sets = cubeFlexFontAsset::getSets(); $res = array(); - foreach($sets as $k => $v) { + foreach ($sets as $k => $v) { $res[$k] = $k; } return $res; } - protected static function getNSISLangs() - { + protected static function getNSISLangs() { $res = array(); $dir = WS_FILES . '/nsislangs'; $dr = opendir($dir); @@ -294,8 +287,7 @@ class wsUrl { return $res; } - public static function editor($args) - { + public static function editor($args) { commonDroits::min(1); global $core; @@ -333,8 +325,7 @@ html{height:100%}' . "\n"; * @param mixed $args * @return */ - public static function restoreLinks($args) - { + public static function restoreLinks($args) { commonDroits::min(1); global $core; @@ -359,8 +350,8 @@ html{height:100%}' . "\n"; $res .= ''; $res .= ''; $i = 0; - foreach($updates as $time => $infos) { - $odd = cubeMath::isOdd($i)?' class="odd"':''; + foreach ($updates as $time => $infos) { + $odd = cubeMath::isOdd($i) ? ' class="odd"' : ''; $res .= ''; $res .= '' . date('Y-m-d H:i:s', $time) . ''; $res .= '' . $infos['links'] . ''; @@ -378,8 +369,7 @@ html{height:100%}' . "\n"; echo $res; } - public static function editComposition($args) - { + public static function editComposition($args) { $fv = array(session_name() => session_id(), 'book_id' => $args[0]); @@ -389,22 +379,20 @@ html{height:100%}' . "\n"; return $res; } - public static function stats($args) - { - $bid = (isset($args[1]))?$args[1]:null; - $annee = (isset($args[2]))?$args[2]:null; - $mois = (isset($args[3]))?$args[3]:null; + public static function stats($args) { + $bid = (isset($args[1])) ? $args[1] : null; + $annee = (isset($args[2])) ? $args[2] : null; + $mois = (isset($args[3])) ? $args[3] : null; return wsStats::display($bid, $annee, $mois); } - public static function viewerp($args) - { + public static function viewerp($args) { commonDroits::min(5); $args = cubePage::getArgs($args); $e = explode('_', $args[0]); - if (count($e) == 2 || $e[2] < TIME-10) { + if (count($e) == 2 || $e[2] < TIME - 10) { $e[2] = TIME; http::redirect(SITE_PATH . 'viewerp/' . implode('_', $e) . '/'); exit; @@ -417,14 +405,13 @@ html{height:100%}' . "\n"; echo self::commonViewer($book_id, $e[1], true); } - public static function vieweru($args) - { + public static function vieweru($args) { commonDroits::min(5); $args = cubePage::getArgs($args); $e = explode('_', $args[0]); - if (count($e) == 2 || $e[2] < TIME-10) { + if (count($e) == 2 || $e[2] < TIME - 10) { $e[2] = TIME; http::redirect(SITE_PATH . 'vieweru/' . implode('_', $e) . '/'); exit; @@ -437,14 +424,13 @@ html{height:100%}' . "\n"; echo self::commonViewer($book_id, $e[1]); } - public static function viewer($args) - { + public static function viewer($args) { $args = cubePage::getArgs($args); - $wmode = isset($args[1])?$args[1]:''; + $wmode = isset($args[1]) ? $args[1] : ''; $e = explode('_', $args[0]); - if (count($e) == 2 || $e[2] < TIME-10) { + if (count($e) == 2 || $e[2] < TIME - 10) { $e[2] = TIME; http::redirect(SITE_PATH . 'viewer/' . implode('_', $e) . '/' . $wmode); exit; @@ -452,7 +438,7 @@ html{height:100%}' . "\n"; $book_id = $e[0]; - $wmode = $wmode != ''?$wmode:'default'; + $wmode = $wmode != '' ? $wmode : 'default'; self::checkDocumentVersionOfBook($book_id); wsSecureSWF::checkProtectedSWF(); @@ -460,8 +446,7 @@ html{height:100%}' . "\n"; echo self::commonViewer($book_id, $e[1], false, $wmode); } - public static function commonViewer($book_id, $hash, $standalone = false, $wmode = 'default') - { + public static function commonViewer($book_id, $hash, $standalone = false, $wmode = 'default') { if (!defined('MINIMIZE_JS')) { define('MINIMIZE_JS', false); } @@ -511,11 +496,11 @@ html{height:100%}' . "\n"; $res .= '' . $book->parametres->title . ''; // Entêtes Facebook if ($book->parametres->facebook) { - $meta['og:title'] = ($book->parametres->facebook_title == '')?$book->parametres->title:$book->parametres->facebook_title; + $meta['og:title'] = ($book->parametres->facebook_title == '') ? $book->parametres->title : $book->parametres->facebook_title; if ($book->parametres->facebook_description != '') { $meta['og:description'] = $book->parametres->facebook_description; } - $meta['og:image'] = 'http://dev.ws.fluidbook.com/services/facebook_thumbnail?id=' . $book->book_id ; + $meta['og:image'] = 'http://dev.ws.fluidbook.com/services/facebook_thumbnail?id=' . $book->book_id; } $alt = ''; @@ -524,10 +509,14 @@ html{height:100%}' . "\n"; $res .= ''; $res .= '
'; $res .= ''; $js = array('fluidbook.js'); $jsvar = array(); @@ -543,14 +532,12 @@ html{height:100%}' . "\n"; return $res; } - public static function statsxls($args) - { - $bid = (isset($args[1]))?$args[1]:null; + public static function statsxls($args) { + $bid = (isset($args[1])) ? $args[1] : null; wsStats::exportXLS($bid); } - public static function chooseExistingBook() - { + public static function chooseExistingBook() { wsDroits::creation(true); $res = '

' . __("Si votre nouvelle publication a des paramètres en commun avec une publication existante, veuillez rechercher cette publication afin d'attribuer par défaut à votre nouvelle publication les paramètres de l'existante") . '

'; $res .= '' . __('Rechercher une publication') . ' : ' . form::field('book_nom', 64, 1024) . form::hidden('book', '') . ''; @@ -559,8 +546,7 @@ html{height:100%}' . "\n"; return $res; } - public static function changeBookProprietaire($book_id) - { + public static function changeBookProprietaire($book_id) { global $core; commonDroits::min(3); @@ -572,8 +558,7 @@ html{height:100%}' . "\n"; return $res; } - public static function chooseBookProject($book_id) - { + public static function chooseBookProject($book_id) { global $core; wsDroits::admin(true); @@ -592,8 +577,7 @@ html{height:100%}' . "\n"; return $res; } - public static function chooseBookTache($book_id, $projet_id) - { + public static function chooseBookTache($book_id, $projet_id) { global $core; wsDroits::admin(true); @@ -613,19 +597,18 @@ html{height:100%}' . "\n"; $res .= '' . __('ou créer une nouvelle tâche') . ' : ' . form::field('nom', 32, 1024, 'Fluidbook #' . $book->book_id . ' : ' . $book->nom) . ' ' . __('ayant le budget suivant') . ' ' . form::field('budget', 6, 6) . ''; } else { $res .= '' . __('Créer une tâche') . ' : ' - . form::hidden('book_id', $book_id) - . form::hidden('projet_id', $projet_id) - . form::hidden('tache', '0') - . form::field('nom', 32, 1024, 'Fluidbook #' . $book->book_id . ' : ' . $book->nom) - . ' ' . __('ayant le budget suivant') - . ' ' . form::field('budget', 6, 6) . ''; + . form::hidden('book_id', $book_id) + . form::hidden('projet_id', $projet_id) + . form::hidden('tache', '0') + . form::field('nom', 32, 1024, 'Fluidbook #' . $book->book_id . ' : ' . $book->nom) + . ' ' . __('ayant le budget suivant') + . ' ' . form::field('budget', 6, 6) . ''; } return $res; } - public static function valideDownload() - { + public static function valideDownload() { global $core; $res .= '' . __("Le téléchargement du fluidbook implique qu'il a été testé et définitivement validé.") . '
' . __("Si vous le téléchargez, il vous sera facturé selon les conditions stipulées dans votre contrat.") . ''; @@ -634,8 +617,7 @@ html{height:100%}' . "\n"; return $res; } - public static function testAS($args) - { + public static function testAS($args) { global $core; commonDroits::min(5); if (!isset($args[1])) { @@ -650,8 +632,7 @@ html{height:100%}' . "\n"; exit; } - public static function testLinksCSV($args) - { + public static function testLinksCSV($args) { global $core; commonDroits::min(5); @@ -661,21 +642,20 @@ html{height:100%}' . "\n"; echo $dao->putLinksFromCSV($args[1]); } - protected static function checkDocumentVersionOfBook($book_id) - { + protected static function checkDocumentVersionOfBook($book_id) { global $core; cubePHP::neverStop(); $dao = new wsDAOBook($core->con); $pages = $dao->getPagesOfBook($book_id); $toUpdate = array(); - foreach($pages as $p => $infos) { + foreach ($pages as $p => $infos) { if ($infos['version'] < 2) { $toUpdate[] = $infos['document_id']; } } $toUpdate = array_unique($toUpdate); - foreach($toUpdate as $document_id) { + foreach ($toUpdate as $document_id) { self::updateDocument($document_id); } @@ -686,15 +666,13 @@ html{height:100%}' . "\n"; } } - public static function testOldLink($args) - { + public static function testOldLink($args) { global $core; $daoDoc = new wsDAODocument($core->con); $daoDoc->setLinksFromOldFluidbook($args[1]); } - protected static function updateDocument($document_id) - { + protected static function updateDocument($document_id) { global $core; $dao = new wsDAODocument($core->con); @@ -703,7 +681,7 @@ html{height:100%}' . "\n"; $doc->copyOriginalFromOlderVersion(); $doc->globalOperations(); - for($i = 1;$i <= $doc->generalInfos['pages'];$i++) { + for ($i = 1; $i <= $doc->generalInfos['pages']; $i++) { $doc->processOnePage($i); } @@ -711,8 +689,7 @@ html{height:100%}' . "\n"; $dao->updateFromObject($doc); } - public static function getParamsHelp() - { + public static function getParamsHelp() { commonDroits::min(5); $res = ''; @@ -729,16 +706,15 @@ html{height:100%}' . "\n"; exit; } - public static function formatHelp($rubriques) - { + public static function formatHelp($rubriques) { commonDroits::min(5); $res = ''; - foreach($rubriques as $label => $fields) { - $res .= "\n" . '-------------------------' . "\n" ; + foreach ($rubriques as $label => $fields) { + $res .= "\n" . '-------------------------' . "\n"; $res .= $label . "\n"; $res .= '-------------------------' . "\n\n"; - foreach($fields as $name => $label) { + foreach ($fields as $name => $label) { if ($label == '|') { $res .= '--' . "\n"; } else { @@ -749,8 +725,7 @@ html{height:100%}' . "\n"; return $res; } - public static function clients($args) - { + public static function clients($args) { global $core; cubePage::truePopup(); cubePage::autoComplete(); @@ -778,12 +753,11 @@ html{height:100%}' . "\n"; return $res; } - public static function listeClients($dashboard = null, $settings = null) - { + public static function listeClients($dashboard = null, $settings = null) { global $core; commonDroits::min(3); - $settings = is_null($settings)?$core->user->getSettings('clients_ws'):$settings; - $change = is_null($dashboard)?'Client':'Dashboard/' . $dashboard; + $settings = is_null($settings) ? $core->user->getSettings('clients_ws') : $settings; + $change = is_null($dashboard) ? 'Client' : 'Dashboard/' . $dashboard; $dao = new commonDAOEntreprise($core->con); if (isset($settings['search']) && !is_null($settings['search'])) { $dao->setSearch($settings['search']); @@ -809,25 +783,25 @@ html{height:100%}' . "\n"; } $res .= ''; $i = 0; - foreach($liste as $id => $client) { + foreach ($liste as $id => $client) { if (!is_array($client->contacts)) { $client->contacts = array(); } - $odd = cubeMath::isOdd($i)?' class="odd"':''; + $odd = cubeMath::isOdd($i) ? ' class="odd"' : ''; $res .= ''; $res .= '' . $client->entreprise_id . ''; $res .= '' . $client->nom . ''; $contacts = array(); - foreach($client->contacts as $c) { + foreach ($client->contacts as $c) { $contacts[] = '' . $c->prenom . ' ' . $c->nom . ''; } $res .= '' . implode(', ', $contacts) . ''; if ($admin) { - $rev = $client->ws_revendeur == ''?'-':$client->ws_revendeur; - $adm = $client->ws_administrateur == ''?'-':$client->ws_administrateur; + $rev = $client->ws_revendeur == '' ? '-' : $client->ws_revendeur; + $adm = $client->ws_administrateur == '' ? '-' : $client->ws_administrateur; $res .= '' . $core->ws_grades[$client->ws_grade] . ''; $res .= '' . $rev . ''; @@ -841,12 +815,12 @@ html{height:100%}' . "\n"; $i++; } if (!isset($settings['search']) || is_null($settings['search'])) { - $odd = cubeMath::isOdd($i)?' class="odd"':''; + $odd = cubeMath::isOdd($i) ? ' class="odd"' : ''; $res .= ''; if ($admin) { - $res .= commonPage::pager($settings['page'], $dao->count(null, 'entreprises_ws') , $settings['par_page'], 'page' . $change . '/%d'); + $res .= commonPage::pager($settings['page'], $dao->count(null, 'entreprises_ws'), $settings['par_page'], 'page' . $change . '/%d'); } else { - $res .= commonPage::pager($settings['page'], $dao->count($core->user, 'entreprises_ws') , $settings['par_page'], 'page' . $change . '/%d'); + $res .= commonPage::pager($settings['page'], $dao->count($core->user, 'entreprises_ws'), $settings['par_page'], 'page' . $change . '/%d'); } $res .= commonUrl::formParPage('parPage' . $change, $settings['par_page'], __('clients')); $res .= ''; @@ -855,8 +829,7 @@ html{height:100%}' . "\n"; return $res; } - public static function formClient($entreprise_id = 'new') - { + public static function formClient($entreprise_id = 'new') { global $core; commonDroits::min(3); $dao = new commonDAOEntreprise($core->con); @@ -904,7 +877,7 @@ html{height:100%}' . "\n"; $signaturesList = $daoSignature->selectAll(); $signatures = array(); - foreach($signaturesList as $s) { + foreach ($signaturesList as $s) { $signatures[$s->nom] = $s->signature_id; } @@ -926,8 +899,7 @@ html{height:100%}' . "\n"; return $res; } - public static function listeContacts($entreprise_id) - { + public static function listeContacts($entreprise_id) { global $core; commonDroits::min(3); $dao = new commonDAOEntreprise($core->con); @@ -936,8 +908,8 @@ html{height:100%}' . "\n"; $res = ''; $res .= ''; $i = 0; - foreach($contacts as $contact) { - $odd = cubeMath::isOdd($i)?' class="odd"':''; + foreach ($contacts as $contact) { + $odd = cubeMath::isOdd($i) ? ' class="odd"' : ''; $res .= ''; $res .= ''; $res .= ''; @@ -949,8 +921,7 @@ html{height:100%}' . "\n"; return $res; } - public static function formContact($client_id = 'new', $entreprise_id = null) - { + public static function formContact($client_id = 'new', $entreprise_id = null) { global $core; commonDroits::min(3); @@ -984,8 +955,7 @@ html{height:100%}' . "\n"; return $res; } - public static function demandes() - { + public static function demandes() { global $core; cubePage::truePopup(); cubePage::autoComplete(); @@ -1010,12 +980,11 @@ html{height:100%}' . "\n"; return $res; } - public static function listeDemandes($dashboard = null, $settings = null) - { + public static function listeDemandes($dashboard = null, $settings = null) { global $core; commonDroits::min(5); - $settings = is_null($settings)?$core->user->getSettings('demandes'):$settings; - $change = is_null($dashboard)?'Demandes':'Dashboard/' . $dashboard; + $settings = is_null($settings) ? $core->user->getSettings('demandes') : $settings; + $change = is_null($dashboard) ? 'Demandes' : 'Dashboard/' . $dashboard; $dao = new wsDAODemande($core->con); if (isset($settings['search']) && !is_null($settings['search'])) { $dao->setSearch($settings['search']); @@ -1025,24 +994,24 @@ html{height:100%}' . "\n"; $res = '
' . $core->typo->Contact('Ajouter un contact') . '
' . trim($contact->prenom . ' ' . $contact->nom) . '' . $contact->email . 'FTP
'; $res .= ''; - $res .= ''; - $res .= ''; + $res .= ''; + $res .= ''; $res .= ''; $res .= ''; $res .= ''; $res .= ''; $res .= ''; $i = 0; - foreach($liste as $id => $demande) { - $odd = cubeMath::isOdd($i)?' class="odd"':''; + foreach ($liste as $id => $demande) { + $odd = cubeMath::isOdd($i) ? ' class="odd"' : ''; $res .= ''; $res .= ''; $res .= ''; $res .= ''; $res .= ''; - $revendeur = $demande->revendeur == 0?'-':$demande->revendeur_nom; + $revendeur = $demande->revendeur == 0 ? '-' : $demande->revendeur_nom; $res .= ''; - $administrateur = $demande->administrateur == 0?'-':$demande->administrateur_nom; + $administrateur = $demande->administrateur == 0 ? '-' : $demande->administrateur_nom; $res .= ''; // Affichage du status // Si non traitée ou traitée, pas la possibilité de changer le status @@ -1071,9 +1040,9 @@ html{height:100%}' . "\n"; $i++; } if (!isset($settings['search']) || is_null($settings['search'])) { - $odd = cubeMath::isOdd($i)?' class="odd"':''; + $odd = cubeMath::isOdd($i) ? ' class="odd"' : ''; $res .= ''; } @@ -1081,8 +1050,7 @@ html{height:100%}' . "\n"; return $res; } - public static function formDemande($demande_id = 'new') - { + public static function formDemande($demande_id = 'new') { global $core; commonDroits::min(5); $dao = new wsDAODemande($core->con); @@ -1108,7 +1076,7 @@ html{height:100%}' . "\n"; } else { $liste = $daoUtilisateur->selectWSRevendeursFacturables(); $revendeurs = array(); - foreach($liste as $revendeur) { + foreach ($liste as $revendeur) { $revendeurs[$revendeur->rs . '(' . $revendeur->prenom . ' ' . $revendeur->nom . ')'] = $revendeur->utilisateur_id; } @@ -1130,8 +1098,7 @@ html{height:100%}' . "\n"; return $res; } - public static function reponseDemande($args) - { + public static function reponseDemande($args) { global $core; commonDroits::min(3); @@ -1180,6 +1147,7 @@ html{height:100%}' . "\n"; $res .= commonPage::bMain(); return $res; } + } ?> \ No newline at end of file
' . commonUrl::orderby('#', 'demande_id', $settings, 'sort' . $change) . '' . commonUrl::orderby(__('Date') , 'date', $settings, 'sort' . $change) . '' . commonUrl::orderby(__('Type') , 'type', $settings, 'sort' . $change) . '' . commonUrl::orderby(__('Date'), 'date', $settings, 'sort' . $change) . '' . commonUrl::orderby(__('Type'), 'type', $settings, 'sort' . $change) . '' . commonUrl::orderby(__('Prospect') . '/' . __('Client'), 'utilisateur_nom', $settings, 'sort' . $change) . '' . commonUrl::orderby(__('Confiée à'), 'revendeur_nom', $settings, 'sort' . $change) . '' . commonUrl::orderby(__('Gérée par'), 'administrateur_nom', $settings, 'sort' . $change) . '' . commonUrl::orderby(__('Statut'), 'status', $settings, 'sort' . $change) . '
' . $demande->demande_id . '' . date(__('d/m/Y H:i'), $demande->date) . '' . $core->demandes_type[$demande->type] . '' . $demande->utilisateur_nom . '' . $revendeur . '' . $administrateur . ''; - $res .= commonPage::pager($settings['page'], $dao->count($core->user) , $settings['par_page'], 'page' . $change . '/%d'); + $res .= commonPage::pager($settings['page'], $dao->count($core->user), $settings['par_page'], 'page' . $change . '/%d'); $res .= commonUrl::formParPage('parPage' . $change, $settings['par_page'], __('demandes')); $res .= '