From: vincent@cubedesigners.com Date: Fri, 21 Dec 2012 15:43:56 +0000 (+0000) Subject: (no commit message) X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=59ab0e9d59183746e8cc286a2c54802bdb098530;p=cubeextranet.git --- diff --git a/inc/commons/class.common.tools.php b/inc/commons/class.common.tools.php index a9b9bb627..7ba49c280 100644 --- a/inc/commons/class.common.tools.php +++ b/inc/commons/class.common.tools.php @@ -184,12 +184,13 @@ class commonTools { $res .= commonPage::bh(); $res.='
'; $res.=''; - $res.=''; + $res.=''; $res.=''; - $res.=''; + $res.=''; $res.=''; - $res.=''; - $res.=''; + $res.=''; + $res.=''; + $res.=''; $res.='
' . __('Générer un favicon') . '
' . __('Générer un favicon') . '
' . __('Veuillez charger une image carrée (dimensions optimales : 256x256 px)') . '
' . __('Bord arrondi') . '%Valeur
' . $core->typo->BoutonOK(__('Générer le favicon')) . '%' . __('Valeurs typiques') . ' :
iOS : 17.54%
' . __('Aucun arrondi') . ' : 0%
' . __("L'arrondi ne sera pas appliqué aux icônes iOS, le système lui même se chargeant d'y appliquer les arrondis et les reflets") . '
' . $core->typo->BoutonOK(__('Générer le favicon')) . '
'; $res.='
'; $res .= ''; @@ -555,7 +556,6 @@ class commonTools { $openssl->setArg('-outform', 'PEM'); $openssl->execute(); - // Generate p12 file $openssl = new cubeCommandLine('openssl'); $openssl->setPath(CONVERTER_PATH); diff --git a/inc/ws/Controlleur/class.ws.ajax.php b/inc/ws/Controlleur/class.ws.ajax.php index bcc5d3576..4b60bf244 100644 --- a/inc/ws/Controlleur/class.ws.ajax.php +++ b/inc/ws/Controlleur/class.ws.ajax.php @@ -884,6 +884,57 @@ class wsAjax extends cubeAjax { $dao->setLinksAndRulers($book_id, json_encode($links), json_encode($rulers), 'Import from excel', $core->user->utilisateur_id); } + public static function offsetLinks($args, &$x) { + global $core; + $book_id = $args[1]; + $offset = $_POST['offset']; + $from = $_POST['from']; + $internal = isset($_POST['internal']); + + if ($internal) { + $daoBook = new wsDAOBook($core->con); + $book = $daoBook->selectById($book_id); + $numerotation = explode(',', $book->numerotation); + } + + + $dao = new wsDAODocument($core->con); + $dao->getLinksAndRulers($book_id, $links, $rulers); + $rlinks = array(); + foreach ($links as $k => $link) { + if ($link['page'] >= $from) { + $link['page']+=$offset; + } + if ($internal && $link['type'] == 5) { + if ($link['numerotation'] == 'physical') { + if ($link['to'] >= $from) { + $link['to']+=$offset; + } + } else { + $ph = array_search($link['to'], $numerotation) + 1; + if ($ph >= $from) { + $ph+=$offset; + $vi = $numerotation[($ph-1)]; + $link['to'] = $vi; + } + } + } + + $rlinks[$k] = $link; + } + + $rrulers = array(); + foreach ($rulers as $k => $ruler) { + if ($ruler['page'] > $from) { + $ruler['page']+=$offset; + } + $rrulers[$k] = $ruler; + } + + $dao->setLinksAndRulers($book_id, $rlinks, $rrulers, 'Offset ' . $offset . ' pages from page # ' . $from, $core->user->utilisateur_id); + $x->addReload(); + } + } ?> \ No newline at end of file diff --git a/inc/ws/Controlleur/class.ws.services.php b/inc/ws/Controlleur/class.ws.services.php index 9e9ad6437..01d3d3898 100644 --- a/inc/ws/Controlleur/class.ws.services.php +++ b/inc/ws/Controlleur/class.ws.services.php @@ -45,9 +45,15 @@ class wsServices extends cubeFlashGateway { } $bookmarks = json_decode(base64_decode($this->args['bookmarks']), true); + fb($bookmarks); $files = array(); foreach ($bookmarks as $b) { - $file = $this->getPDFComplex($this->args['id'], $b['page'] . '-' . $b['page'] + $b['nb']); + $range = $b['page']; + if ($b['nb'] > 1) { + $range.='-' . ($b['page'] + $b['nb'] - 1); + } + + $file = $this->getPDFComplex($this->args['id'], $range); $files[] = array('name' => $b['name'], 'file' => $file['file']); } @@ -369,8 +375,6 @@ class wsServices extends cubeFlashGateway { $mail->to = 'chequieravantages@gmail.com'; $body = ''; - - foreach ($fields as $k => $f) { $body.=$k . ' : ' . $this->args[$f] . "\r\n"; $datas[$f] = $this->args[$f]; diff --git a/inc/ws/Controlleur/class.ws.url.php b/inc/ws/Controlleur/class.ws.url.php index 02a5642a4..71045dd4d 100644 --- a/inc/ws/Controlleur/class.ws.url.php +++ b/inc/ws/Controlleur/class.ws.url.php @@ -527,12 +527,30 @@ html{height:100%}' . "\n"; $res .= ''; $res .= ''; $res .= '