Ejemplo n.º 1
0
<?php

/**
 * This is a view for home.
 *
 * @author        Arsess Vakilpour
 * @version       1.0
 * @package       Peris24-Testprojekt
 */
$home = new Home();
$home->par = $this;
$home->page_title = 'Preis24-Testprojekt';
$main_image = new Img();
$main_image->Src = ROOT_DIR . APPLICATION_DIR . IMAGES_DIR . 'smartphone-tariff.jpg';
$main_image->Id = 'main_image';
$home->content = '<br />' . $main_image->Display();
include_once 'view/javascripts/' . $this->get_values['Page'] . '.javascript.php';
$home->Display();
Ejemplo n.º 2
0
 /**
  * This method is used to display the button edit object.
  *
  * @return        string HTML img tag.
  */
 public function Display()
 {
     $image = new Img(null, 'edit', ROOT_DIR . BASE_ICONS_DIR . 'Edit.png', 'bearbeiten', $this->Title, null, 'edit_row ( event ) ;', null, 'vertical-align: middle ;');
     $return_value = ($this->Id === '' || $this->Id === null ? '' : '<a href="index.php?Page=' . $this->Type . '&Id=' . $this->Id . '">') . $image->Display() . ($this->Id === '' || $this->Id === null ? '<script type="text/javascript" charset="utf-8">' . 'function edit_row ( event ) {' . 'var id  = $( event.target ).parent( ).children( ".hiddenField" ).attr( "value" ) ;' . 'window.location.href = "index.php?Page=Edit' . $this->Type . '&Id=" + id' . '}' . '</script>' : '</a>');
     return $return_value;
 }
Ejemplo n.º 3
0
 /**
  * This method is used to display the button initialize filter object.
  *
  * @return        string HTML button tag.
  */
 public function Display()
 {
     $imgSetFilter = new Img('Button_Ini_Filter', null, ROOT_DIR . BASE_ICONS_DIR . 'Ini_Filter.png', 'Filter zur&uuml;cksetzen', 'Filter zur&uuml;cksetzen', null, 'ini_filter( ) ;', null, 'margin: 5px; padding: 0 15px 2px 15px; width: 50px; cursor: pointer;');
     $return_value = $imgSetFilter->Display() . '<script type="text/javascript" charset="utf-8">' . 'function ini_filter ( ) {' . '$( "input" ).prop ( "value" , "" ) ;' . '$( "select" ).prop ( "selectedIndex" , 0 ) ;' . '$( "#Button_Set_Filter" ).click ( ) ;' . '}' . '</script>';
     return $return_value;
 }
Ejemplo n.º 4
0
 /**
  * This method is used to display the button delete object.
  *
  * @return        string HTML img tag.
  */
 public function Display()
 {
     $image = new Img(null, 'cross', ROOT_DIR . BASE_ICONS_DIR . 'Delete.png', 'l&ouml;schen', 'l&ouml;schen', null, 'delete_row ( event ) ;', null, 'vertical-align: middle ;');
     $return_value = $image->Display() . '<script type="text/javascript" charset="utf-8">' . 'function delete_row ( event ) {' . 'var id  = $( event.target ).parent( ).children( ".hiddenField" ).attr( "value" ) ;' . 'var titleArray = $("th span").map(function(){return $(this).text();}).get();' . 'var ctr = 0 ;' . 'var dat = "" ;' . 'var thisRow = $( event.target ).closest( "tr" ) ;' . '$( event.target ).parent( ).parent( ).children( ":not(.funcs)" ).each( function ( ) { dat += titleArray [ ctr ] + ( titleArray [ ctr ] == "" ? "" : ": " ) + this.innerHTML + "<br />" ; ctr++ ; } ) ;' . 'apprise ( "Möchten Sie wirklich <br /><br />" + dat + "<br /> löschen?" , { "animate" : true , "verify" : true , "textYes" : "Ja" , "textNo" : "Nein" } , function ( r ) {' . 'if ( r ) {' . '$.post ( "ajax/index.php?Ajax=Delete' . substr($_REQUEST['Page'], 4, strlen($_REQUEST['Page']) - 5) . '" , {' . 'Id : id' . '} , function ( data ) {' . 'if ( data.trim( ) == "Success" ) {' . 'apprise ( dat + "<br />vollständig gelöscht." , { "animate" : true } , function ( ) {' . 'document.location.reload ( true );' . '} );' . '}' . 'else {' . 'apprise ( "Beim Speichern ist ein Fehler aufgetreten. " + data.trim ( ) , { "animate" : true } , function ( ) {' . 'if ( data.trim( ) == "Ihre Sitzung auf jacques.de ist abgelaufen." ) {' . '$( "#username" ).prop( "value" , "" ) ;' . '$( "#password" ).prop( "value" , "" ) ;' . '$( "#modaltrigger" ).click( ) ;' . '}' . '} ) ;' . '}' . '}' . ');' . '}' . '} );' . '}' . '</script>';
     return $return_value;
 }