Example #1
0
 function start()
 {
     $link = true;
     self::getURL();
     $options = $this->separate();
     if ($options[0] == 1) {
         echo "menu";
     } else {
         $this->controler = $options[1];
         if (isset($options[2])) {
             $pos = strrpos($options[2], "=");
             if ($pos === false) {
                 $this->method = $options[2];
             } else {
                 $pos1 = strrpos($options[1], "Vista");
                 if ($pos1 === false) {
                     $this->method = substr($options[2], 0, -1 * $pos + 1);
                     exit(header('Location: http://' . URL . DS . $options[1] . DS . $this->method));
                 } else {
                     $this->value = substr($options[2], $pos - strlen($options[2]) + 1);
                     $this->method = substr($options[2], 0, $pos - strlen($options[2]));
                 }
             }
         } else {
             exit(header('Location: http://' . URL . DS . $options[1] . DS . 'start'));
         }
         if (!import::loadModule("module", $this->controler)) {
             //exit(header( 'Location: http://'.URL.DS.'login'.DS.'404'));
             echo "error, no se encontro el controlador " . $this->controler . "\n";
         }
         $class = $this->controler;
         if (method_exists($class, $this->method)) {
             $getType = new ReflectionMethod($class, $this->method);
             if (!$getType->isPublic()) {
                 exit(header('Location: http://' . URL . DS . $options[1] . DS . 'start'));
             } else {
                 $method = $this->method;
                 $class = new $class();
                 $class->{$method}('none');
             }
         } else {
             echo "error, no se encontro el metodo " . $this->method . "\n";
         }
     }
 }
 public static function classmap($app, $dir_prefix, $routes)
 {
     foreach ($routes as $regex => $appfile) {
         if ($regex == '/') {
             // sometimes users will enter /admin instead of /admin/, so if
             // the regex is a /, wee need to change it to /? to account for
             // this issue.
             $regex .= '?';
         }
         if (preg_match('~^' . $dir_prefix . $regex . '$~', ROUTES_CURRENTURI)) {
             import::app($app . '/' . $appfile . '.php');
             $app = new $appfile();
             return true;
         }
         echo $dir_prefix . $regex . "\n";
     }
     die('LogError: No Class Routes Found For ' . ROUTES_CURRENTURI);
 }
Example #3
0
 function start()
 {
     $MainLogger = new Logger();
     $MainLogger->OpenLogger();
     $link = true;
     self::getURL();
     $options = $this->separate();
     $this->controler = $options[1];
     if (isset($options[2])) {
         $this->method = $options[2];
     } else {
         $this->method = "start";
     }
     if (!import::loadModule("module", $this->controler)) {
         $MainLogger->WriteLogger("Modulo -> " . $this->controler . " no encontrado.");
         echo "error 404, no se encontro el controlador " . $this->controler . "\n";
         $MainLogger->CloseLogger();
     } else {
         $class = $this->controler;
         if (method_exists($class, $this->method)) {
             $getType = new ReflectionMethod($class, $this->method);
             if (!$getType->isPublic()) {
                 $MainLogger->WriteLogger("Acceso Denegado -> " . $this->method);
                 echo "Error 505, acceso denegado.\n";
                 $MainLogger->CloseLogger();
             } else {
                 $MainLogger->WriteLogger("Cargando clase: " . $class . ", Metodo: " . $this->method);
                 $MainLogger->CloseLogger();
                 $method = $this->method;
                 $class = new $class();
                 $class->{$method}('none');
             }
         } else {
             $MainLogger->WriteLogger("metodo -> " . $this->method . " no encontrado.");
             echo "error 404, no se encontro el metodo " . $this->method . "\n";
             $MainLogger->CloseLogger();
         }
     }
 }
<?php

require dirname(__FILE__) . '/src/import.php';
/**
 * Depending on the platform used to deploy this solution, it may be required
 * to account for static files within php. If .htaccess is available then it is
 * should be used insted of the following:
 */
import::routes();
if (preg_match('~^/(public|images|javascript|stylesheets)/~', ROUTES_CURRENTURI)) {
    import::src('static.php');
    exit;
}
import::app('routes.php');
<?php

import::routes();
routes::appmap(array('/install' => 'install.php', '/admin(.*?)' => 'admin/routes.php', '/dev(.*?)' => 'dev/routes.php'));
Example #6
0
<?php

$menu = false;
if (checkTableExists() == false) {
    //	echo "SCHEME";
    //SQL import
    $import = new import();
    $import->file = "./databases/mysql/structure.sql";
    $import->pattern_find = array('si_', 'DOMAIN-ID', 'LOCALE', 'LANGUAGE');
    $import->pattern_replace = array(TB_PREFIX, '1', 'en_GB', 'en_GB');
    //dbQuery($import->collate());
    $db->query($import->collate());
}
Example #7
0
<?php

switch ($_GET['step']) {
    default:
        $dsp->NewContent(t('Bugtracker Import'), t('Hier kannst du die bugs.xml-Datei Importieren, die du auf deiner Webseite exportiert hast'));
        $dsp->SetForm('index.php?mod=bugtracker&action=import&step=2', '', '', 'multipart/form-data');
        $dsp->AddFileSelectRow("importdata", t('Import (.xml, .csv, .tgz)'), "");
        $dsp->AddFormSubmitRow('next');
        $dsp->AddContent();
        break;
    case 2:
        include_once 'modules/install/class_import.php';
        $import = new import();
        $import->GetImportHeader($_FILES['importdata']['tmp_name']);
        $entrys = $xml->get_tag_content_array("entrys", $import->xml_content_lansuite);
        $entry = $xml->get_tag_content_array("entry", $entrys[0]);
        if ($entry) {
            foreach ($entry as $entry_val) {
                $main = $xml->get_tag_content_array("main", $entry_val);
                $caption = $xml->get_tag_content("caption", $main[0]);
                $text = $xml->get_tag_content("text", $main[0]);
                $version = $xml->get_tag_content("version", $main[0]);
                $url = $xml->get_tag_content("url", $main[0]);
                $priority = $xml->get_tag_content("priority", $main[0]);
                $date = $xml->get_tag_content("date", $main[0]);
                $type = $xml->get_tag_content("type", $main[0]);
                $module = $xml->get_tag_content("module", $main[0]);
                $state = $xml->get_tag_content("state", $main[0]);
                $db->qry("INSERT INTO %prefix%bugtracker SET\n        caption = '{$caption}',\n        text = '{$text}',\n        version = '{$version}',\n        url = '{$url}',\n        priority = " . (int) $priority . ",\n        date = '{$date}',\n        type = " . (int) $type . ",\n        module = '{$module}',\n        state = " . (int) $state . ",\n        reporter = " . (int) $auth['userid'] . "\n        ");
                $bugid = $db->insert_id();
                $comments = $xml->get_tag_content_array("comments", $entry_val);
Example #8
0
                            </div>
                            <h4 class="panel-title">Detalle Base de Datos</h4>
                        </div>
                        <div class="panel-body">
                            <div class="table-responsive">
                                <table id="data-table" class="table table-striped table-bordered">
                                    <thead>
                                        <tr>
                                            <th>Descripcion</th>
                                            <th>Host</th>
                                            <th>Usuario</th>
                                        </tr>
                                    </thead>
                                    <tbody>
	                                    <?php 
import::load('lib', 'MySQL');
$query = "\tselect descripcion,host_conexion,user\r\n\t                                    \t\t\t\tfrom billing.bases_cobro\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\torder by id_base;";
$conexion = new MySQL(0);
$exec = $conexion->consulta($query);
while ($row2 = $conexion->fetch_row($exec)) {
    //if ($row2[2] == 1){$value = "Activo";}else{$value = "Baja";}
    echo "<tr><td>{$row2['0']}</td><td>{$row2['1']}</td><td>{$row2['2']}</td></tr>";
}
?>
                                    </tbody>
                                </table>
                            </div>
                        </div>
                    </div>
                    <!-- end panel -->
                </div>
<?php

/**
 * As developers we need to maintain and control information that site admins
 * have no use for. This information includes, but is not limited to: Error Logs,
 * Script Execution Times, Database Query Totals, Slow Queries, and Peak Traffic 
 * Times.
 *
 * On the same token, admins control content that we do not need to be bothered
 * with. This is what /Dev is for, showing developers the information they need
 * to make sound decisions and to nip errors in the bud, without the extra clutter
 * and hastle of actual page content.
 *
 * This also opens the door to adding a cloud editor in the Dev environment
 * so that devs can log on from any computer and make code changes online.
 */
import::routes();
import::RequestHandler();
import::template();
import::models();
routes::classmap('dev', '/dev', array('/' => 'Dashboard', '/login' => 'Login', '/logout' => 'Logout'));
Example #10
0
            }
        } else {
            exit;
        }
    } elseif ($id == 2) {
        $e_mail = $_POST['e_mail'];
        $dbfbasa = $_POST['dbfbasa'];
        foreach ($databases as $data) {
            if ($dbfbasa != 'all') {
                if ($dbfbasa == $data['dbasa']) {
                    $import = new import($data, $e_mail, $dbfbasa);
                    $import->disconnect();
                    break;
                }
            } elseif ($dbfbasa == 'all') {
                $import = new import($data, $e_mail, $dbfbasa);
                $import->disconnect();
            }
        }
    }
}
$dir = $_SERVER['PHP_SELF'];
$image = "R0lGODlhGwFxAMQAAAAAAP////X19ezs7OLi4tnZ2c/Pz8XFxby8vLKysqmpqZ+fn5WVlYyMjIKC\ngnl5eW9vb////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEA\nABEALAAAAAAbAXEAAAX/YCCOZGmeaKqubOu+cCzPdG3feK7vfO//wKBwSCwaj8ikcslsOp/QqHRK\nrVqv2Kx2y+16v+CweEwum8/otHrNbrvf8Lh8Tq/b7/i8fs/v+/+AgYKDhIWGh4iJil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VYTcffLoPAXdBAq/FIAamTDzoSx3\ne8GCBTTFyAjDrf/wxPR+ChiHhwMS8KuAVZ7jUHmAv/5peculXQSjBwvg0/SRxB8p0SmBhzxgHYBJ\n0/sBgKEXh8IWb2tHH25SGWoFZ99XBMEXA/i2gBB4A3b3AikXgRYoZJIHAzl3gRwIAxMxcITXgSI4\ngiRYgiZ4giiYgiq4gizYgi74gjAYgzI4gzRYgzZ4gziYgzq4gzzYgz74g0AYhEI4hERYhEZ4hEiY\nhEq4hEYYAgA7";
if (isset($_GET['img'])) {
    echo base64_decode($image);
}
echo <<<phpMM

<!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.0 Frameset//EN'>
<html>
<?php

import::dbModel();
import::model('UserGroup.php');
class User extends dbModel
{
    public $email = dbModel::EMAIL;
    public $password = dbModel::PASSWORD;
    public $group = dbModel::FOREIGNKEY;
    protected $__foreignkeys = array('group' => 'UserGroup');
}
Example #12
0
<?php

define('CMSPATH', str_replace("\\", "/", dirname(__FILE__)));
define('DS', "/");
define('COREPATH', CMSPATH . DS . 'core');
require_once COREPATH . DS . "loader.php";
$access = Import::load("lib", "Start_Page");
$access = $access and import::load('lib', 'view');
$MainLogger = new Logger();
$MainLogger->OpenLogger();
$MainLogger->WriteLogger("--------------------------------------Main Page Start---------------------------------------");
$LestStart = new Start_Page();
if ($access) {
    $MainLogger->WriteLogger($LestStart->checkURL() . " validando " . URL . DS);
    if ($LestStart->checkURL() == URL . DS) {
        $MainLogger->WriteLogger("Redireccionando -> Location: http://" . URL . DS . 'home');
        $MainLogger->WriteLogger("--------------------------------------Main Page End-----------------------------------------");
        $MainLogger->CloseLogger();
        header('Location: http://' . URL . DS . 'home');
    } else {
        $MainLogger->WriteLogger("Cargando Start_Page()");
        $MainLogger->WriteLogger("--------------------------------------Main Page End-----------------------------------------");
        $MainLogger->CloseLogger();
        $LestStart->start();
    }
} else {
    $MainLogger->WriteLogger("No se logro realizar la carga de los archivos.");
    $MainLogger->CloseLogger();
}
<?php

import::dbModel();
class UserGroup extends dbModel
{
    public $name = dbModel::SMALLSTRING;
}
Example #14
0
}
$folder = $_REQUEST["folder"];
sys_check_auth();
import::header();
if (isset($_FILES["file"]) and is_array($_FILES["file"])) {
    $files = import::process_files();
    if (!empty($files)) {
        if (!sys_validate_token()) {
            sys_die(t("{t}Invalid security token{/t}"));
        }
        $folder = folder_from_path($folder);
        $validate_only = isset($_REQUEST["validate_only"]);
        foreach ($files as $file) {
            $message = $validate_only ? t("{t}Validating %s ...{/t}") : t("{t}Processing %s ...{/t}");
            setup::out(sprintf("<b>" . $message . "</b>", q(modify::basename($file))));
            ajax::file_import($folder, $file, array("setup", "out"), $validate_only);
            setup::out("<hr>");
        }
    }
}
$sgsml = new sgsml($folder, "new");
$view = $sgsml->view;
$required_fields = array();
foreach ($sgsml->current_fields as $name => $field) {
    if (empty($field["REQUIRED"])) {
        continue;
    }
    $required_fields[$name] = !empty($field["DISPLAYNAME"]) ? $field["DISPLAYNAME"] : $name;
}
import::form($folder, $required_fields);
// TODO use URL for upload
Example #15
0
    function analyse($path, $parent, $title, $root, $parseId, $action, $levelCnt)
    {
        //echoall($path);
        $importArray = import::fetch_file_to_array($path);
        $delimiter = ";";
        //    echoarray($importArray);
        ?>
<style>
  table {
    border:1px;
    padding:0px;
    margin:0px;
  }
  
  th {
    color:black;
    border-width:1px;
    font-size:10pt;
  }
  
  td {
    color:black;
    border-width:1px;
    font-size:10pt;
  }
</style>

<?php 
        if (is_array($importArray)) {
            echo "<h2>Analyse {$path}</h2>";
            //      $levelCnt = 7;
            $linePos = 0;
            echo "<table border='1' cellpadding='0' cellspacing='0'>";
            if ($parseId) {
                echo "<th>ID</th>";
            }
            for ($li = 0; $li < $levelCnt; $li++) {
                echo "<th>Level {$li}</th>";
            }
            echo "<th>Herkunft</th>";
            echo "<th>Bemerkung</th>";
            foreach ($importArray as $entry) {
                if ($linePos != 0 or !$title) {
                    $lineArray = explode($delimiter, $entry);
                    $colPos = 0;
                    if ($parseId) {
                        $entryid = $lineArray[0];
                    }
                    // loop for entries
                    if ($parseId) {
                        $start = 1;
                    } else {
                        $start = 0;
                    }
                    // filter id
                    for ($i = $start; $i < count($lineArray); $i++) {
                        $lineEntry = str_replace("\n", '', $lineArray[$i]);
                        $lineEntry = str_replace("\r", '', $lineEntry);
                        $source = $lineArray[$li + 1];
                        $comment = $lineArray[$li + 2];
                        if ($lineEntry) {
                            $parentArray[$colPos] = $lineEntry;
                            // utf8_encode($lineEntry);
                            // insert into database
                            if ($action == "insert") {
                                $parentName = $parentArray[$colPos - 1];
                                if (!$parentName) {
                                    $parentName = thesaurus::get_name($parent);
                                }
                                // no parent name -> use thesaurus
                                if ($root) {
                                    $source = $root;
                                }
                                $newId = import::insert($lineEntry, $parentName, "{$idName}={$entryid};Root={$source};Bemerkung={$comment}");
                            }
                            break;
                        }
                        $colPos++;
                    }
                    // remove unused array items
                    for ($i = $colPos + 1; $i < 7; $i++) {
                        $parentArray[$i] = "";
                    }
                    // display line
                    echo "<tr>";
                    if ($parseId) {
                        echo "<td>{$entryid}</td>";
                    } else {
                        echo "<td>&nbsp;</td>";
                    }
                    foreach ($parentArray as $entry) {
                        echo "<td>" . $entry . "</td>";
                    }
                    if ($source) {
                        echo "<td>{$source}</td>";
                    } else {
                        echo "<td>&nbsp;</td>";
                    }
                    if ($comment) {
                        echo "<td>{$comment}</td>";
                    } else {
                        echo "<td>&nbsp;</td>";
                    }
                    if ($newId) {
                        echo "<td><i><b>({$newId})</b></i></td>";
                    }
                    echo "</tr>";
                } else {
                    // header
                    $lineArray = explode($delimiter, $entry);
                    $idName = $lineArray[0];
                    $sourceName = $lineArray[7];
                    $commentName = $lineArray[8];
                }
                $linePos++;
                // next line of file
            }
            echo "</table>";
        }
    }
Example #16
0
<?php

//include_once("paths.php");
//require_once('../core/import.php');
import::load('lib', 'MySQL');
import::load('lib', 'Session');
class Validate_Auth
{
    public static function start()
    {
        Session::start();
    }
    public static function logout()
    {
        $conexion = new MySQL(0);
        $query = "update usuario set logged = 0, date_logged = now(), session_id = '' where usuario = '" . $_SESSION['login'] . "';";
        $result1 = $conexion->consulta($query);
        $conexion->MySQLClose();
        Session::destroy();
    }
    public static function check()
    {
        $session = Session::get("login");
        if ($session != false) {
            $conexion = new MySQL(0);
            $query = "select logged, date_logged,now() as fe from usuario where usuario = '" . $_SESSION["login"] . "';";
            $result1 = $conexion->consulta($query);
            $row = $conexion->fetch_row($result1);
            $valor = $conexion->num_rows($result1);
            if ($valor == 1) {
                $fechaGuardada = $row[1];
Example #17
0
                foreach ($v2 as $k3 => $v3) {
                    //TODO: IF NULL don't ''
                    $i == "1" ? $columns .= $k3 : ($columns .= ", " . $k3);
                    $i == "1" ? $values .= "'" . $v3 . "'" : ($values .= ", '" . $v3 . "'");
                    $i++;
                }
                $sql = "INSERT into " . $table . " (" . $columns . ") VALUES (" . $values . ");";
                echo "SQL: " . $sql;
                $columns = "";
                $values = "";
            }
            echo "<br>";
        }
    }
    public function doImport()
    {
        $json = $this->getFile();
        $decode = $this->decode($this->getFile());
        $this->process($decode);
    }
}
/*
$import = new import();
$import->file = "EssentialData.json";
$import->import();
*/
$import = new import();
$import->file = "EssentialData.json";
$import->pattern_find = "si_";
$import->pattern_replace = "XID";
$import->replace();
Example #18
0
}
?>
> Titelzeile
      <input type='checkbox' name='parseId' value='1' <?php 
if ($parseId) {
    echo "checked='checked'";
}
?>
> ID
      <input type='text' name='levelCnt' value='<?php 
echo $levelCnt;
?>
'> # of Levels</p>

<?php 
echo "<p>Import in Thesaurus <b>'" . thesaurus::get_name($id) . "'</b></p>";
?>
     
    </form>
  </div>
<?php 
//------------------------------------------------------------------------------
// display analysed data
echo "<div id='infobig'>";
import::analyse($destination, $id, $title, $root, $parseId, $action, $levelCnt);
echo "</div>";
?>

</body>
</html>
Example #19
0
<?php

require_once $_SERVER['DOCUMENT_ROOT'] . '/core/import.php';
import::load('lib', 'Validate_Auth');
import::load('core', 'Start_page');
import::load('lib', 'Session');
import::load('lib', 'MySQL');
import::load('lib', 'view');
class Usuario
{
    function __construct()
    {
        $this->titulo = 'Billing Vas Pass';
        $this->mensaje = '';
    }
    function start($mensaje)
    {
        if (self::check()) {
            if ($_SESSION['access'] == 1) {
                $data = array("Titulo" => "Billing Vas Pass", "mensaje" => $mensaje);
                self::LoadTemplate("usuario/usuario.php", $data);
            } else {
                $_SESSION['value'] = 'Acceso denegado';
                session_write_close();
                exit(header('Location: http://' . URL . DS . 'dashboard' . DS . 'start'));
            }
        } else {
            exit(header('Location: http://' . URL . DS));
        }
    }
    function edit($mensaje)
Example #20
0
 static function file_import($folder, $file, $output_func = false, $validate_only = false)
 {
     self::_require_access($folder, "write", "new");
     $import = new import();
     return $import->file($file, $folder, $output_func, $validate_only);
 }
Example #21
0
<?php

$menu = false;
$import = new import();
$domain_id = domain_id::get();
if (checkTableExists('expense') == false) {
    $import->file = "./extensions/expense/install/db.sql";
    $import->pattern_find = array('si_', 'DOMAIN-ID', 'LOCALE', 'LANGUAGE');
    $import->pattern_replace = array(TB_PREFIX, $domain_id, 'en_GB', 'en_GB');
    //	$db->query($import->collate());
    $import->execute();
    $import->file = "./extensions/expense/install/db2.sql";
    $import->execute();
    //	$import->file = "./extensions/expense/install/db3.sql";
    //	$import->execute();
}
Example #22
0
 function enter()
 {
     import::load('lib', 'Validar');
 }
Example #23
0
<?php

define('CMSPATH', str_replace("\\", "/", dirname(__FILE__)));
define('DS', "/");
define('COREPATH', CMSPATH . DS . 'core');
require_once COREPATH . DS . "loader.php";
$access = Import::load("lib", "Start_Page");
$access = $access and import::load('lib', 'view');
$access = $access and import::load('lib', 'Validate_Auth');
validate_auth::start();
$LestStart = new Start_Page();
if ($access) {
    if ($LestStart->checkURL() == URL . DS) {
        header('Location: http://' . URL . DS . 'login' . DS . "start");
    } else {
        $LestStart->start();
    }
} else {
    echo "No se logro realizar la carga de los archivos.";
}
            } elseif (DB_PREFIX . 'conf_users' === $table) {
                continue;
            }
            $arrResult[] = array('table' => $table, 'size' => USR_PREFIX . 'users' === $table ? count($arrDataTable) * 2 : count($arrDataTable));
        }
        // передаем данные для отображения прогресса импорта
        $smarty->assign('importData', ajax::sdgJSONencode($arrResult));
        // включаем страницу отображения прогресса импорта
        $smarty->assign('importContinueProgress', true);
        // включаем предупреждение
        $arrWarnings[] = FORM_SYSTEM_IMPORT_WARNING;
        $smarty->assign('warnings', $arrWarnings);
    } elseif (isset($_POST['execute'])) {
        !validate::postDataNotEmpty() ? $arrErrors[] = ERROR_EMPTY_FORM_FIELDS : null;
        //(!import::dbConnect($_POST['dbhost'], $_POST['dbname'], $_POST['dbuser'], '')) ? $arrErrors[] = ERROR_CONNECT_DB : null;
        !import::dbConnect($_POST['dbhost'], $_POST['dbname'], $_POST['dbuser'], $_POST['dbpassword']) ? $arrErrors[] = ERROR_CONNECT_DB : null;
        if (empty($arrErrors)) {
            $arrTables = array('subscription' => &$_POST['table_subscription'], 'vacancy' => &$_POST['table_vacancy'], 'resume' => &$_POST['table_resume'], 'city' => &$_POST['table_city'], 'region' => &$_POST['table_region'], 'profession' => &$_POST['table_profession'], 'section' => &$_POST['table_section'], 'users' => &$_POST['table_users'], 'news' => &$_POST['table_news']);
            // передаем данные для отображения прогресса импорта
            $smarty->assign('importData', import::mdsImportDB($arrTables));
            // включаем страницу отображения прогресса импорта
            $smarty->assign('importShowProgress', true);
            // включаем предупреждение
            $arrWarnings[] = FORM_SYSTEM_IMPORT_WARNING;
            $smarty->assign('warnings', $arrWarnings);
        }
    }
} else {
    messages::error404();
}
$smarty->assignByRef('errors', $arrErrors);
Example #25
0
	        <input type="button" value=" Cancel " onClick="self.location.href='./index.php'">
	      </td>
	      <td>
	      </td>
	    </tr>
	
	  </table>
	</form>
	
	<?php 
} else {
    if (!isset($_POST['browser']) || $_POST['browser'] == "") {
        message("no browser selected");
    }
    $parentfolder = set_post_parentfolder();
    $import = new import();
    if ($_POST['browser'] == "opera") {
        $import->import_opera();
    } else {
        if ($_POST['browser'] == "netscape") {
            $import->import_netscape();
        }
    }
    echo "{$import->count_folders} folders and {$import->count_bookmarks} bookmarks imported.<br>\n";
    echo '<a href="./index.php">My Bookmarks</a>';
}
?>

		</div>
	<!-- Main content ends here. -->
	</div>
Example #26
0
         if (!empty($person_id) && $person_id != 0) {
             $im->et_person_hinzu($et_id, $person_id);
         }
     }
     weiterleiten("index.php?daten=objekte_raus&objekte_raus=import");
     break;
 case "person_et":
     print_req();
     $p_typ = $_POST['p_typ'];
     // Mieter oder ET
     $einheit_id = $_POST['einheit_id'];
     $person_id = $_POST['name_g'];
     if ($p_typ == 'ET') {
         $et_seit = $_POST['et_seit'];
         echo "ET {$einheit_id} {$person_id} {$et_seit}";
         $im = new import();
         $von = date_german2mysql($et_seit);
         if ($im->get_last_eigentuemer_id($einheit_id) != false) {
             $et_id = $im->get_last_eigentuemer_id($einheit_id);
         } else {
             $et_id = $im->et_erstellen($einheit_id, $von);
         }
         $im->et_person_hinzu($et_id, $person_id);
     }
     weiterleiten("index.php?daten=objekte_raus&objekte_raus=import");
     break;
 case "stammdaten_pdf":
     if (isset($_REQUEST['objekt_id']) && !empty($_REQUEST['objekt_id'])) {
         $_SESSION['objekt_id'] = $_REQUEST['objekt_id'];
         $pdf = new Cezpdf('a4', 'portrait');
         $oo = new objekt();
<?php

import::src('h2o.php');
h2o::load('i18n');
class template
{
    public static function render($file, &$vars = array())
    {
        $template = new H2o($file, array('cache' => 'file', 'cache_dir' => dirname($file) . '/cache'));
        echo $template->render($vars);
    }
}
<?php

/**
 * The requested file is static, so we need to set some headers to enforce browser
 * caching and then ouput the contents of the file.
 */
import::routes();
$resource_file = str_replace('public/', '', ROUTES_CURRENTURI);
import::resource($resource_file);