diff --git a/cli.php b/cli.php index 1c253ee1..e626490c 100755 --- a/cli.php +++ b/cli.php @@ -2,7 +2,7 @@ require_once ('vn/lib/cli-app.php'); -$cliApp = new Vn\Lib\CliApp ('hedera-web', './rest'); +$cliApp = new Vn\Lib\CliApp ('hedera-web', __DIR__.'/rest'); $cliApp->run (); ?> diff --git a/conf/apache.conf b/conf/apache.conf index 981a7795..bb8d0d82 100644 --- a/conf/apache.conf +++ b/conf/apache.conf @@ -1,5 +1,5 @@ # Alias /hedera-web /usr/share/hedera-web/ -# Alias /vn-image-data /var/cache/hedera-web/image-db/ +# Alias /vn-image-data /var/lib/hedera-web/image/ @@ -21,7 +21,7 @@ - + Options Indexes FollowSymLinks MultiViews AllowOverride FileInfo Options diff --git a/debian/changelog b/debian/changelog index 000e3f77..ff5c7713 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -hedera-web (1.343-deb8) stable; urgency=low +hedera-web (1.345-deb8) stable; urgency=low * Initial Release. diff --git a/debian/control b/debian/control index a5e5a93b..14506252 100644 --- a/debian/control +++ b/debian/control @@ -9,7 +9,7 @@ Vcs-Git: git://www.verdnatura.es/var/git/hedera-web Package: hedera-web Architecture: all -Depends: apache2, php5-mysql, php5-mcrypt, php-vn-web +Depends: apache2, php5-mysql, php5-mcrypt, php5-ssh2, php-vn-lib Suggests: php-text-captcha, php5-imap, vn-image, tinymce Section: misc Priority: optional diff --git a/image/store.png b/forms/cms/why/store.png similarity index 100% rename from image/store.png rename to forms/cms/why/store.png diff --git a/forms/cms/why/ui.xml b/forms/cms/why/ui.xml index dfc6db71..98bb6c9c 100755 --- a/forms/cms/why/ui.xml +++ b/forms/cms/why/ui.xml @@ -15,7 +15,7 @@
  • BecauseOurWorkShop
  • BecauseWeHaveWhatYouNeed
  • - Store photo + Store photo diff --git a/forms/ecomerce/catalog/catalog.js b/forms/ecomerce/catalog/catalog.js index 076f7077..d11a2335 100644 --- a/forms/ecomerce/catalog/catalog.js +++ b/forms/ecomerce/catalog/catalog.js @@ -123,7 +123,7 @@ Vn.Catalog = new Class }); var img = builder.$('image'); - img.src = 'image/family_dark/'+ form.get ('id') +'.svg'; + img.src = 'image/family/light/'+ form.get ('id') +'.svg'; img.title = form.get ('name'); img.alt = img.title; } diff --git a/image/family/1.svg b/image/family/dark/1.svg similarity index 100% rename from image/family/1.svg rename to image/family/dark/1.svg diff --git a/image/family/2.svg b/image/family/dark/2.svg similarity index 100% rename from image/family/2.svg rename to image/family/dark/2.svg diff --git a/image/family/3.svg b/image/family/dark/3.svg similarity index 100% rename from image/family/3.svg rename to image/family/dark/3.svg diff --git a/image/family/4.svg b/image/family/dark/4.svg similarity index 100% rename from image/family/4.svg rename to image/family/dark/4.svg diff --git a/image/family/5.svg b/image/family/dark/5.svg similarity index 100% rename from image/family/5.svg rename to image/family/dark/5.svg diff --git a/image/family/7.svg b/image/family/dark/7.svg similarity index 100% rename from image/family/7.svg rename to image/family/dark/7.svg diff --git a/image/family_dark/1.svg b/image/family/light/1.svg similarity index 100% rename from image/family_dark/1.svg rename to image/family/light/1.svg diff --git a/image/family_dark/2.svg b/image/family/light/2.svg similarity index 100% rename from image/family_dark/2.svg rename to image/family/light/2.svg diff --git a/image/family_dark/3.svg b/image/family/light/3.svg similarity index 100% rename from image/family_dark/3.svg rename to image/family/light/3.svg diff --git a/image/family_dark/4.svg b/image/family/light/4.svg similarity index 100% rename from image/family_dark/4.svg rename to image/family/light/4.svg diff --git a/image/family_dark/5.svg b/image/family/light/5.svg similarity index 100% rename from image/family_dark/5.svg rename to image/family/light/5.svg diff --git a/image/family_dark/7.svg b/image/family/light/7.svg similarity index 100% rename from image/family_dark/7.svg rename to image/family/light/7.svg diff --git a/image/blog.svg b/image/social/blog.svg similarity index 100% rename from image/blog.svg rename to image/social/blog.svg diff --git a/image/blogger.svg b/image/social/blogger.svg similarity index 100% rename from image/blogger.svg rename to image/social/blogger.svg diff --git a/image/facebook.svg b/image/social/facebook.svg similarity index 100% rename from image/facebook.svg rename to image/social/facebook.svg diff --git a/image/google-plus.svg b/image/social/google-plus.svg similarity index 100% rename from image/google-plus.svg rename to image/social/google-plus.svg diff --git a/image/youtube.svg b/image/social/youtube.svg similarity index 100% rename from image/youtube.svg rename to image/social/youtube.svg diff --git a/js/hedera/gui.xml b/js/hedera/gui.xml index b2cb8b9f..ba41c1cb 100755 --- a/js/hedera/gui.xml +++ b/js/hedera/gui.xml @@ -30,16 +30,16 @@ diff --git a/js/hedera/login.xml b/js/hedera/login.xml index 8bd6973f..96da195f 100755 --- a/js/hedera/login.xml +++ b/js/hedera/login.xml @@ -41,16 +41,16 @@ diff --git a/rest/edi/load.php b/rest/edi/load.php index b918233f..deed9a8b 100644 --- a/rest/edi/load.php +++ b/rest/edi/load.php @@ -180,12 +180,12 @@ class Load extends Edi\Method if (!$error) { $folder = $this->imapConf['success_folder']; - printf ('Mail loaded with %d lines.', $count); + echo "Mail loaded with $count lines.\n"; } else { $folder = $this->imapConf['error_folder']; - printf ('Mail error: %s', $error); + echo "Mail error: $error\n"; } // Moves the mail to another folder diff --git a/rest/image/util.php b/rest/image/util.php index fcb1bd92..9525795b 100755 --- a/rest/image/util.php +++ b/rest/image/util.php @@ -13,7 +13,7 @@ class Util function __construct ($app) { $this->app = $app; - $this->dataDir = _DATA_DIR .'/'. $app->getName () .'/image'; + $this->dataDir = _DATA_DIR .'/'. $app->getName () .'/image-db'; } /** diff --git a/rest/misc/mail.php b/rest/misc/mail.php index 001b71d5..2b50a911 100755 --- a/rest/misc/mail.php +++ b/rest/misc/mail.php @@ -71,7 +71,7 @@ class Mail extends Vn\Lib\Method if (file_exists ($attachment)) $mail->AddAttachment ($attachment, ''); else - throw new Exception ('Attachment file could not be found: '. $attachment); + throw new Exception ("Attachment file could not be found: $attachment"); } if (!$mail->Send ()) diff --git a/rest/misc/sms.php b/rest/misc/sms.php new file mode 100644 index 00000000..ecee919b --- /dev/null +++ b/rest/misc/sms.php @@ -0,0 +1,59 @@ +login (); + + $params = [ + 'text' + ,'to' + ]; + + if (!$this->checkParams ($_REQUEST, $params)) + throw new Lib\UserException (s('Missing parameters'), 'missingParams'); + + $smsConfig = $db->getRow ('SELECT uri, user, password, title FROM sms_config'); + + $sClient = new SoapClient ($smsConfig['uri']); + $xmlString = $sClient->sendSMS ( + $smsConfig['user'] + ,$smsConfig['password'] + ,$smsConfig['title'] + ,$_GET['to'] + ,$_GET['text'] + ); + $xmlResponse = new SimpleXMLElement ($xmlString); + + $customer = empty ($_GET['customer']) ? NULL : $_GET['customer']; + + try { + $sms = $xmlResponse->sms; + $db->query ( + 'INSERT INTO vn2008.sms (Id_trabajador, `text`, `to`, `from`, sent, response, Id_Cliente) + VALUES (account.user_get_id(), #, #, #, #, #, #)', + [ + $_GET['text'] + ,$_GET['to'] + ,$_GET['to'] + ,$sms->codigo + ,$sms->descripcion + ,$customer + ] + ); + } + catch (Exception $e) + { + trigger_error ($e->getMessage (), E_USER_WARNING); + } + + return TRUE; + } +} + +?>