Imagenes reorganizadas, errores solucionados, webservice SMS
2
cli.php
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
require_once ('vn/lib/cli-app.php');
|
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 ();
|
$cliApp->run ();
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# Alias /hedera-web /usr/share/hedera-web/
|
# 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/
|
||||||
|
|
||||||
<Directory /usr/share/hedera-web/>
|
<Directory /usr/share/hedera-web/>
|
||||||
|
|
||||||
|
@ -21,7 +21,7 @@
|
||||||
|
|
||||||
</Directory>
|
</Directory>
|
||||||
|
|
||||||
<Directory /var/cache/hedera-web/image-db/>
|
<Directory /var/lib/hedera-web/image/>
|
||||||
|
|
||||||
Options Indexes FollowSymLinks MultiViews
|
Options Indexes FollowSymLinks MultiViews
|
||||||
AllowOverride FileInfo Options
|
AllowOverride FileInfo Options
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
hedera-web (1.343-deb8) stable; urgency=low
|
hedera-web (1.345-deb8) stable; urgency=low
|
||||||
|
|
||||||
* Initial Release.
|
* Initial Release.
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,7 @@ Vcs-Git: git://www.verdnatura.es/var/git/hedera-web
|
||||||
|
|
||||||
Package: hedera-web
|
Package: hedera-web
|
||||||
Architecture: all
|
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
|
Suggests: php-text-captcha, php5-imap, vn-image, tinymce
|
||||||
Section: misc
|
Section: misc
|
||||||
Priority: optional
|
Priority: optional
|
||||||
|
|
Before Width: | Height: | Size: 40 KiB After Width: | Height: | Size: 40 KiB |
|
@ -15,7 +15,7 @@
|
||||||
<li><t>BecauseOurWorkShop</t></li>
|
<li><t>BecauseOurWorkShop</t></li>
|
||||||
<li><t>BecauseWeHaveWhatYouNeed</t></li>
|
<li><t>BecauseWeHaveWhatYouNeed</t></li>
|
||||||
</ul>
|
</ul>
|
||||||
<img src="image/store.png" alt="Store photo"/>
|
<img src="forms/cms/why/store.png" alt="Store photo"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -123,7 +123,7 @@ Vn.Catalog = new Class
|
||||||
});
|
});
|
||||||
|
|
||||||
var img = builder.$('image');
|
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.title = form.get ('name');
|
||||||
img.alt = img.title;
|
img.alt = img.title;
|
||||||
}
|
}
|
||||||
|
|
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 4.2 KiB |
Before Width: | Height: | Size: 5.7 KiB After Width: | Height: | Size: 5.7 KiB |
Before Width: | Height: | Size: 5.7 KiB After Width: | Height: | Size: 5.7 KiB |
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 2.7 KiB |
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 2.4 KiB |
Before Width: | Height: | Size: 5.6 KiB After Width: | Height: | Size: 5.6 KiB |
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 3.6 KiB |
Before Width: | Height: | Size: 5.1 KiB After Width: | Height: | Size: 5.1 KiB |
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 3.4 KiB |
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 2.7 KiB |
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.3 KiB |
Before Width: | Height: | Size: 5.1 KiB After Width: | Height: | Size: 5.1 KiB |
Before Width: | Height: | Size: 5.7 KiB After Width: | Height: | Size: 5.7 KiB |
Before Width: | Height: | Size: 6.0 KiB After Width: | Height: | Size: 6.0 KiB |
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 2.4 KiB |
Before Width: | Height: | Size: 27 KiB After Width: | Height: | Size: 27 KiB |
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.5 KiB |
|
@ -30,16 +30,16 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="links">
|
<div class="links">
|
||||||
<a target="_blank" href="https://blog.verdnatura.es/">
|
<a target="_blank" href="https://blog.verdnatura.es/">
|
||||||
<img alt="Blogger" src="image/blog.svg" title="Blog"/>
|
<img alt="Blogger" src="image/social/blog.svg" title="Blog"/>
|
||||||
</a>
|
</a>
|
||||||
<a target="_blank" href="https://plus.google.com/u/0/107516577801959283883/posts">
|
<a target="_blank" href="https://plus.google.com/u/0/107516577801959283883/posts">
|
||||||
<img alt="Google+" src="image/google-plus.svg" title="Google+"/>
|
<img alt="Google+" src="image/social/google-plus.svg" title="Google+"/>
|
||||||
</a>
|
</a>
|
||||||
<a target="_blank" href="http://www.facebook.com/verdnatura">
|
<a target="_blank" href="http://www.facebook.com/verdnatura">
|
||||||
<img alt="Facebook" src="image/facebook.svg" title="Facebook"/>
|
<img alt="Facebook" src="image/social/facebook.svg" title="Facebook"/>
|
||||||
</a>
|
</a>
|
||||||
<a target="_blank" href="http://www.youtube.com/user/verdnatura">
|
<a target="_blank" href="http://www.youtube.com/user/verdnatura">
|
||||||
<img alt="YouTube" src="image/youtube.svg" title="YouTube"/>
|
<img alt="YouTube" src="image/social/youtube.svg" title="YouTube"/>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -41,16 +41,16 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="links">
|
<div class="links">
|
||||||
<a target="_blank" href="https://blog.verdnatura.es/">
|
<a target="_blank" href="https://blog.verdnatura.es/">
|
||||||
<img alt="Blogger" src="image/blog.svg" title="Blog"/>
|
<img alt="Blogger" src="image/social/blog.svg" title="Blog"/>
|
||||||
</a>
|
</a>
|
||||||
<a target="_blank" href="https://plus.google.com/u/0/107516577801959283883/posts">
|
<a target="_blank" href="https://plus.google.com/u/0/107516577801959283883/posts">
|
||||||
<img alt="Google+" src="image/google-plus.svg" title="Google+"/>
|
<img alt="Google+" src="image/social/google-plus.svg" title="Google+"/>
|
||||||
</a>
|
</a>
|
||||||
<a target="_blank" href="http://www.facebook.com/verdnatura">
|
<a target="_blank" href="http://www.facebook.com/verdnatura">
|
||||||
<img alt="Facebook" src="image/facebook.svg" title="Facebook"/>
|
<img alt="Facebook" src="image/social/facebook.svg" title="Facebook"/>
|
||||||
</a>
|
</a>
|
||||||
<a target="_blank" href="http://www.youtube.com/user/verdnatura">
|
<a target="_blank" href="http://www.youtube.com/user/verdnatura">
|
||||||
<img alt="YouTube" src="image/youtube.svg" title="YouTube"/>
|
<img alt="YouTube" src="image/social/youtube.svg" title="YouTube"/>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|
|
@ -180,12 +180,12 @@ class Load extends Edi\Method
|
||||||
if (!$error)
|
if (!$error)
|
||||||
{
|
{
|
||||||
$folder = $this->imapConf['success_folder'];
|
$folder = $this->imapConf['success_folder'];
|
||||||
printf ('Mail loaded with %d lines.', $count);
|
echo "Mail loaded with $count lines.\n";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$folder = $this->imapConf['error_folder'];
|
$folder = $this->imapConf['error_folder'];
|
||||||
printf ('Mail error: %s', $error);
|
echo "Mail error: $error\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
// Moves the mail to another folder
|
// Moves the mail to another folder
|
||||||
|
|
|
@ -13,7 +13,7 @@ class Util
|
||||||
function __construct ($app)
|
function __construct ($app)
|
||||||
{
|
{
|
||||||
$this->app = $app;
|
$this->app = $app;
|
||||||
$this->dataDir = _DATA_DIR .'/'. $app->getName () .'/image';
|
$this->dataDir = _DATA_DIR .'/'. $app->getName () .'/image-db';
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -71,7 +71,7 @@ class Mail extends Vn\Lib\Method
|
||||||
if (file_exists ($attachment))
|
if (file_exists ($attachment))
|
||||||
$mail->AddAttachment ($attachment, '');
|
$mail->AddAttachment ($attachment, '');
|
||||||
else
|
else
|
||||||
throw new Exception ('Attachment file could not be found: '. $attachment);
|
throw new Exception ("Attachment file could not be found: $attachment");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$mail->Send ())
|
if (!$mail->Send ())
|
||||||
|
|
|
@ -0,0 +1,59 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
require_once ('vn/web/json-request.php');
|
||||||
|
|
||||||
|
use Vn\Lib;
|
||||||
|
|
||||||
|
class Sms extends Vn\Web\JsonRequest
|
||||||
|
{
|
||||||
|
function run ()
|
||||||
|
{
|
||||||
|
$db = $this->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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|