Example #1
0
  You should have received a copy of the GNU General Public License
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/
require_once "clienteNewsService.php";
require_once "prepend.php";
require_once "configuracion.php";
require_once "UI.php";
page_open(array("sess" => "Sesion_Blufeedme"));
if (isset($_GET['operacion'])) {
    global $clienteS;
    global $categoriasS;
    global $noticiasS;
    global $userp;
    global $passp;
    try {
        $clienteS = new ClienteNewsService($userp, $passp);
    } catch (Exception $e) {
        showAlert($e->getMessage());
        exit(1);
    }
    if ($clienteS != NULL) {
        if (isset($userp)) {
            if (!empty($userp)) {
                $usuario = $userp;
            } else {
                $mens_error = "No se ha introducido ningun usuario";
            }
        }
        if (isset($passp)) {
            if (!empty($passp)) {
                $password = $passp;
Example #2
0
  
  You should have received a copy of the GNU General Public License
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/
require_once "prepend.php";
require_once "configuracion.php";
require_once "UI.php";
require_once "clienteNewsService.php";
page_open(array("sess" => "Sesion_Blufeedme"));
global $userp;
global $passp;
global $categoriasS;
global $noticiasS;
if (isset($_POST['usuario']) && isset($_POST['password']) && !empty($_POST['usuario']) && !empty($_POST['password'])) {
    try {
        $cliente = new ClienteNewsService($_POST['usuario'], $_POST['password']);
    } catch (Exception $e) {
        echo "<script type=\"text/javascript\"> \n\t\t\t\t\$.ajax({\n\t\t\t\t\t\ttype: \"POST\",\n\t\t\t\t\t\tdata: \"error=WebService no disponible\",\n\t\t\t\t\t\turl: 'alerta.php',\n\t\t\t\t\t\tsuccess: function(data){\n\t\t\t\t\t\t\t\$('#central').html(data);\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t</script>";
        exit(1);
    }
    try {
        $cat = $cliente->getCategory();
        unset($categoriasS);
        if (!is_null($cat)) {
            if (is_array($cat)) {
                if (count($cat)) {
                    foreach ($cat as $c) {
                        $categoriasS[$c->id] = $c;
                    }
                }
            }
Example #3
0
require_once "formularios.php";
require_once "prepend.php";
require_once "configuracion.php";
require_once "clienteNewsService.php";
require_once "UI.php";
page_open(array("sess" => "Sesion_Blufeedme"));
global $userp;
global $passp;
global $categoriasS;
global $noticiasS;
global $dispositivosS;
if (isset($_GET['operacion'])) {
    //si se han introducido usuario y password
    if (!empty($userp) && !empty($passp)) {
        try {
            $cliente = new ClienteNewsService($userp, $passp);
        } catch (Exception $e) {
            showAlert("WebService no disponible");
            exit(-1);
        }
        try {
            $cat = $cliente->getCategory();
            if (is_array($cat)) {
                if (count($cat) > 0) {
                    foreach ($cat as $c) {
                        $categoriasS[$c->id] = $c;
                    }
                }
            }
        } catch (Exception $e) {
            showAlert($e->getMessage());