function add_mainMenu()
 {
     $div = html_div('');
     $div->add(html_br());
     $table =& html_table(Session::getContextValue('mainInterfaceWidth'), 0, 0, 0);
     $row = html_tr();
     $blank = html_td('', '', html_img(Theme::getThemeImagePath("invisible.gif"), 10, 10));
     //$blank->set_tag_attribute('colspan','4');
     $image = html_td('', '', html_img(Theme::getThemeImagePath("invisible.gif"), 20, 14));
     $image->set_tag_attribute('align', 'right');
     $image->set_tag_attribute('width', '40%');
     $link = html_a(Util::format_URLPath("bibliography/index.php"), agt('Catálogo'), null, "_top");
     $link->set_tag_attribute('class', '');
     $item1 = html_td('', '', $link);
     $item1->set_tag_attribute('width', '20%');
     $link = html_a(Util::format_URLPath("bibliography/index.php", 'status=ref'), agt('Referencias bibliográficas'), null, "_top");
     $link->set_tag_attribute('class', '');
     $item2 = html_td('', '', $link);
     $item2->set_tag_attribute('width', '20%');
     $link = html_a(Util::format_URLPath("bibliography/index.php", 'status=link'), agt('Enlaces de interés'), null, "_top");
     $link->set_tag_attribute('class', '');
     $item3 = html_td('', '', $link);
     $item3->set_tag_attribute('width', '20%');
     $row->add($blank);
     $row->add($image);
     $row->add($item1);
     $row->add($item2);
     $row->add($item3);
     $table->add_row($row);
     $div->add($table);
     return $div;
 }
 function add_mainMenu()
 {
     $div = html_div('');
     $div->add(html_br());
     $table =& html_table(Session::getContextValue('mainInterfaceWidth'), 0, 0, 0);
     $row = html_tr();
     $blank = html_td('', '', html_img(Theme::getThemeImagePath("invisible.gif"), 10, 10));
     //$blank->set_tag_attribute('colspan','4');
     $image = html_td('', '', html_img(Theme::getThemeImagePath("invisible.gif"), 20, 14));
     $image->set_tag_attribute('align', 'right');
     $image->set_tag_attribute('width', '40%');
     $link = html_a(Util::format_URLPath("userManager/index.php", 'status=new&pid=' . $this->getViewVariable('pid')), agt('Registrar'), null, "_top");
     $link->set_tag_attribute('class', '');
     $item1 = html_td('', '', $link);
     $item1->set_tag_attribute('width', '20%');
     $link = html_a(Util::format_URLPath("userManager/index.php", 'status=list&pid=' . $this->getViewVariable('pid')), agt('Ficha'), null, "_top");
     $link->set_tag_attribute('class', '');
     $item2 = html_td('', '', $link);
     $item2->set_tag_attribute('width', '20%');
     $link = html_a(Util::format_URLPath("userManager/index.php", 'status=del&pid=' . $this->getViewVariable('pid')), agt('Baja'), null, "_top");
     $link->set_tag_attribute('class', '');
     $item3 = html_td('', '', $link);
     $item3->set_tag_attribute('width', '20%');
     $row->add($blank);
     $row->add($image);
     $row->add($item1);
     $row->add($item2);
     $row->add($item3);
     $table->add_row($row);
     $div->add($table);
     return $div;
 }
 /**
  *
  */
 function main_block()
 {
     $main = html_div();
     $main->set_id('content');
     $title = html_h2('Se ha producido un error');
     $title->set_tag_attribute('class', 'warncolor');
     $main->add($title);
     //Puede no estar definido el contexto
     $width = Session::getContextValue('mainInterfaceWidth');
     if (!isset($width)) {
         $width = '100%';
     }
     $table = html_table($width, 0, 1, 0);
     //Puede no estar definido el error
     $error = $this->getViewVariable('str_error');
     if (!isset($error)) {
         $error = 'No error code was given';
     }
     $row = html_td('warncolor', '', $error);
     $row->set_tag_attribute('align', 'center');
     $table->add_row($row);
     //Puede no estar definido la url de retorno
     $url = $this->getViewVariable('str_url');
     if (isset($url)) {
         $row = html_td('', '', html_a($url, agt('Volver')));
         $row->set_tag_attribute('align', 'center');
         $table->add_row($row);
     }
     $main->add($table);
     return $main;
 }
 /**
  *
  */
 function main_block()
 {
     $main = html_div();
     $main->set_id("content");
     $title = html_h2("Se ha producido un error");
     $title->set_tag_attribute("class", "warncolor");
     $main->add($title);
     //Puede no estar definido el contexto
     $width = Session::getContextValue("mainInterfaceWidth");
     if (!isset($width)) {
         $width = "100%";
     }
     $table = html_table($width, 0, 8, 0);
     //Puede no estar definido el error
     $error = $this->getViewVariable('str_error');
     if (!isset($error)) {
         $error = "No error code was given";
     }
     $row = html_td("warncolor", "", $error);
     $row->set_tag_attribute("align", "center");
     $table->add_row($row);
     //Puede no estar definido la url de retorno
     $url = $this->getViewVariable('str_url');
     if (isset($url)) {
         $row = html_td("", "", html_a($url, _('Volver')));
         $row->set_tag_attribute("align", "center");
         $table->add_row($row);
     }
     $main->add($table);
     return $main;
 }
 function add_mainMenu()
 {
     $div = html_div('');
     $div->add(html_br());
     $table =& html_table(Session::getContextValue('mainInterfaceWidth'), 0, 0, 0);
     $row = html_tr();
     $blank = html_td('', '', html_img(Theme::getThemeImagePath("invisible.gif"), 10, 10));
     //$blank->set_tag_attribute('colspan','4');
     $image = html_td('', '', html_img(Theme::getThemeImagePath("invisible.gif"), 20, 14));
     $image->set_tag_attribute('align', 'right');
     $image->set_tag_attribute('width', '40%');
     $link = html_a(Util::format_URLPath("profileManager/index.php", 'submit=new'), agt('Nuevo perfil'), null, "_top");
     $link->set_tag_attribute('class', '');
     $item1 = html_td('', '', $link);
     $item1->set_tag_attribute('width', '20%');
     /*$link = html_a(Util::format_URLPath("profileManager/index.php",'submit=del'), agt('Baja perfil'), null, "_top");
                $link->set_tag_attribute('class', '');
                $item2 = html_td('', '', $link);
                $item2->set_tag_attribute('width', '20%');
     		*/
     $row->add($blank);
     $row->add($image);
     $row->add($item1);
     //$row->add($item2);
     $table->add_row($row);
     $div->add($table);
     return $div;
 }
Example #6
0
 function content_block()
 {
     //  Build the FormProcessor, and add the
     //  form content object that the FormProcessor
     //  will use.
     //
     $container = container();
     //  Create the form
     $form = new SwimmerAddForm("Add Swimmer", null, 600);
     //  Create the form processor
     $fp = new FormProcessor($form);
     //  Don't display the form again if processing was successful.
     $fp->set_render_form_after_success(false);
     //  Add the Form Processor to the container.
     //  If the Form Processor was succesful, display
     //  some statistics about the uploaded file.
     if ($fp->is_action_successful()) {
         //  Add the InfoTableCSS so the tables look right
         $this->add_head_css(new DefaultGUIDataListCSS());
         $swimmers = new SwimmersDataList("Swimmers", '100%', "swimmerid");
         $div = html_div();
         $div->set_id("swimmersgdl");
         $div->add($swimmers);
         $container->add($div);
         //  Add the Form Processor to the container.
         $container->add(html_br(2), $fp);
     } else {
         $container->add($fp);
     }
     return $container;
 }
Example #7
0
function msg()
{
    if (isset($_POST["id"])) {
        //redirect search by id
        header("Location: http://" . $_SERVER['HTTP_HOST'] . "/menu.php/message/search/" . $_POST["id"]);
        die;
    }
    // search message template
    include_once "template/search.tpl";
    // leave message template
    include_once "template/form.tpl";
    // list everyone's msg
    html_div(100, 0, "#812919", 30);
    echo "Message Board";
    html_div_end();
    html_div(100, 40, "#ffffff", 15);
    for ($id = 1; $id < 50; $id++) {
        if (file_exists("./message/" . $id . ".txt")) {
            // print message from file
            $file = fopen("./message/" . $id . ".txt", "r");
            $fsize = filesize("./message/" . $id . ".txt");
            $message = fread($file, $fsize);
            html_div(100, 0, "#812919", 20);
            echo "Message ID: " . $id . "<br>";
            html_div_end();
            html_div(100, 0, "#ffffff", 20);
            // print message
            echo $message . "<br>";
            html_div_end();
        }
    }
    html_div_end();
}
Example #8
0
function search()
{
    //search form
    if (isset($_POST["id"])) {
        //search by id
        header("Location: http://" . $_SERVER['HTTP_HOST'] . "/menu.php/db/id/" . $_POST["id"]);
        die;
    }
    if (isset($_POST["name"])) {
        //search by name
        header("Location: http://" . $_SERVER['HTTP_HOST'] . "/menu.php/db/name/" . $_POST["name"]);
        die;
    }
    //include search engine template
    include_once "template/db_id.tpl";
    include_once "template/db_name.tpl";
    //list pokeDex
    html_div(100, 0, "#812919", 30);
    echo "PokeDex";
    html_div_end();
    $query = "SELECT * FROM pm_list";
    mysql_query("SET NAMES UTF8");
    $result = mysql_query($query);
    html_div(100, 25, "#ffffff", 15);
    while ($row = mysql_fetch_assoc($result)) {
        html_div(100, 10, "#ffffff", 20);
        echo $row["id"] . " " . $row["name"];
        html_div_end();
    }
    html_div_end();
}
 function main_block()
 {
     $main = html_div();
     $table = html_table(Session::getContextValue("mainInterfaceWidth"), 0, 1, 0);
     $table->add_row($this->_block());
     $main->add($table);
     return $main;
 }
 function right_block()
 {
     $main = html_div();
     $main->set_id("content");
     $course_name = $this->getViewVariable('course_name');
     $main->add(agt('miguel_userSubscriptionOk') . ' -> ' . $course_name);
     return $main;
 }
 function right_block()
 {
     $div = html_div();
     $titulo = html_p(agt('miguel_ContactDetail'));
     $titulo->set_tag_attribute('class', 'ptabla01');
     $div->add($titulo);
     $div->add($this->_contactDetail());
     return $div;
 }
 /**
  * This method is called ONLY after ALL validation has
  * passed.  This is the method that allows you to 
  * do something with the data, say insert/update records
  * in the DB.
  */
 function form_action()
 {
     $success = true;
     $result = new SwimResult();
     $result->PurgeResults();
     $this->set_action_message(html_div(sprintf('ft-%s-msg', $result->getAffectedRows() == 0 ? 'warning' : 'note'), sprintf('%d record%s purged from Results database.', $result->getAffectedRows(), $result->getAffectedRows() == 1 ? '' : 's')));
     unset($result);
     return $success;
 }
 function right_block()
 {
     $ret_val = container();
     $div = html_div();
     $titulo = html_p(agt('miguel_NewCourse'));
     $titulo->set_tag_attribute('class', 'ptabla01');
     $div->add($titulo);
     $div->add($this->addForm('newCourse', 'miguel_newCourseForm'));
     $ret_val->add($div);
     return $ret_val;
 }
 /**
  * We override this method to automatically
  * break up the main block into a 
  * left block and a right block
  *
  * @param TABLEtag object.
  */
 function main_block()
 {
     $main = html_div();
     $main->set_id("content");
     $table = html_table(Session::getContextValue("mainInterfaceWidth"), 0, 1, 0);
     $table->set_class("simple");
     //Authentication
     $table->add_row($this->_block());
     $main->add($table);
     return $main;
 }
Example #15
0
 function content_block()
 {
     //  Add the InfoTableCSS so the tables look right
     $this->add_head_css(new DefaultGUIDataListCSS());
     $container = container();
     $results = new SwimResultsAdminDataList("Swim Results", '100%', "swimmer_name, swim_date");
     $div = html_div();
     $div->set_id("resultsgdl");
     $div->add($results);
     $container->add($div);
     return $container;
 }
Example #16
0
 function content_block()
 {
     //  Add the InfoTableCSS so the tables look right
     $this->add_head_css(new DefaultGUIDataListCSS());
     $container = container();
     $swimmers = new SwimmersDataList("Swimmers", '100%', "swimmerid");
     $div = html_div();
     $div->set_id("swimmersgdl");
     $div->add($swimmers);
     $container->add($div);
     return $container;
 }
Example #17
0
 function content_block()
 {
     //  Add the InfoTableCSS so the tables look right
     $this->add_head_css(new DefaultGUIDataListCSS());
     $container = container();
     $sdifqueue = new SDIFQueueDataList("SDIF Queue", '100%', "sdifrecordid");
     $div = html_div();
     $div->set_id("sdifqueuegdl");
     $div->add($sdifqueue);
     $container->add($div);
     return $container;
 }
Example #18
0
 function content_block()
 {
     //  Build the FormProcessor, and add the
     //  form content object that the FormProcessor
     //  will use.
     //
     $container = container();
     //  This allows passing arguments eithers as a GET or a POST
     $scriptargs = array_merge($_GET, $_POST);
     //  The swimteamid is the argument which must be
     //  dealt with differently for GET and POST operations
     if (array_key_exists("swimteamid", $scriptargs)) {
         $swimteamid = $scriptargs["swimteamid"];
     } else {
         if (array_key_exists("_swimteamid", $scriptargs)) {
             $swimteamid = $scriptargs["_swimteamid"];
         } else {
             if (array_key_exists(FT_DB_PREFIX . "radio", $scriptargs)) {
                 $swimteamid = $scriptargs[FT_DB_PREFIX . "radio"][0];
             } else {
                 $swimteamid = null;
             }
         }
     }
     //  Create the form
     //$form = new SwimTeamUpdateForm("Update Swim Team", $_SERVER['PHP_SELF'], 600) ;
     $form = new SwimTeamUpdateForm("Update Swim Team", null, 600);
     $form->setSwimTeamId($swimteamid);
     //  Create the form processor
     $fp = new FormProcessor($form);
     //  Don't display the form again if processing was successful.
     $fp->set_render_form_after_success(false);
     //  Update the Form Processor to the container.
     //  If the Form Processor was succesful, display
     //  some statistics about the uploaded file.
     if ($fp->is_action_successful()) {
         //  Add the InfoTableCSS so the tables look right
         $this->add_head_css(new DefaultGUIDataListCSS());
         $swimteams = new SwimTeamsDataList("Swim Teams", '100%', "swimteamid");
         $div = html_div();
         $div->set_id("swimteamsgdl");
         $div->add($swimteams);
         $container->add($div);
         //  Update the Form Processor to the container.
         $container->add(html_br(2), $fp);
     } else {
         $container->add($fp);
     }
     return $container;
 }
Example #19
0
 function content_block()
 {
     //  Add the InfoTableCSS so the tables look right
     $this->add_head_css(new DefaultGUIDataListCSS());
     //  This allows passing arguments eithers as a GET or a POST
     $scriptargs = array_merge($_GET, $_POST);
     //  The eventid is the argument which must be
     //  dealt with differently for GET and POST operations
     if (array_key_exists("eventid", $scriptargs)) {
         $eventid = $scriptargs["eventid"];
     } else {
         if (array_key_exists("_eventid", $scriptargs)) {
             $eventid = $scriptargs["_eventid"];
         } else {
             if (array_key_exists(FT_DB_PREFIX . "radio", $scriptargs)) {
                 $eventid = $scriptargs[FT_DB_PREFIX . "radio"][0];
             } else {
                 $eventid = null;
             }
         }
     }
     //  Need better error handling but for now just die!
     if (is_null($eventid)) {
         die('Bad Event Id:  ' . basename(__FILE__) . '::' . __LINE__);
     }
     $container = container();
     $e = explode('-', $eventid);
     //$it = new SwimMeetInfoTable('Swim Meet Details', '500') ;
     //$it->setSwimMeetId($eventid) ;
     //$it->BuildInfoTable(false) ;
     //$container->add($it, html_br(2)) ;
     //  Complex order by clause to make sure DQ and NS are shown
     //  after valid times.
     $swimresults = new SwimResultsDataList('Results', '100%', 'event_number,
         case when finals_time_ft = 0.0 then 1 else 0 end, finals_time_ft', null, null, null, sprintf('event_gender="%s" AND event_age_code="%s"
         AND stroke_code="%s" AND event_distance="%s"', $e[0], $e[1], $e[2], $e[3]));
     $swimresults->set_save_vars(array('eventid' => $eventid));
     $div = html_div();
     $div->set_id("swimresultsgdl");
     $div->add($swimresults);
     $container->add($div);
     $container->add(FlipTurnGUIButtons::getBackHomeButtons());
     return $container;
 }
 function main_block()
 {
     $wrapper_div = html_div('');
     $table = html_table(Session::getContextValue("mainInterfaceWidth"), 0, 0, 0);
     $elem1 = html_td('', '', html_img(Theme::getThemeImagePath("esquina.gif"), 37, 39, 0, ''));
     $elem1->set_tag_attribute('width', '1%');
     $elem2 = html_td('', '', '');
     $elem2->set_tag_attribute('width', '96%');
     $elem3 = html_td('', '', '');
     $elem3->set_tag_attribute('width', '3%');
     $row = html_tr();
     $row->add($elem1);
     $row->add($elem2);
     $row->add($elem3);
     $table->add_row($row);
     $row = html_tr();
     $space = html_td('', '', html_img(Theme::getThemeImagePath("invisible.gif")));
     $space->set_tag_attribute('width', '3%');
     $row->add($space);
     //Preparamos contenido
     $content = html_td('', '', $this->content());
     $content->set_tag_attribute('width', '94%');
     $row->add($content);
     $row->add($space);
     $table->add_row($row);
     $marco = html_table(Session::getContextValue("mainInterfaceWidth"), 0, 0, 0);
     $mc_cont = html_td('plomoizda', '', $table);
     $mc_cont->set_tag_attribute('valign', 'top');
     $marco->add_row($mc_cont);
     //add the main body
     $wrapper_div->add($marco);
     //linea fondo
     $linea = html_table(Session::getContextValue("mainInterfaceWidth"), 0, 0, 0);
     $yellowLine = html_tr();
     $yellowLine->set_tag_attribute('bgcolor', '#FFCC33');
     //$yellowLine->set_tag_attribute('valign','top');
     $line = html_td('', '', html_img(Theme::getThemeImagePath("invisible.gif"), 10, 10));
     $line->set_tag_attribute('colspan', '3');
     $yellowLine->add($line);
     $linea->add_row($yellowLine);
     $wrapper_div->add($linea);
     $this->add($wrapper_div);
 }
 function right_block()
 {
     $ret_val = container();
     $hr = html_hr();
     $hr->set_tag_attribute('noshade');
     $hr->set_tag_attribute('size', 2);
     $ret_val->add($hr);
     $div = html_div('ul-big');
     $div->add(html_img(Util::app_URLPath('../var/themes/Miguel/image/menu/addcourse.png'), 0, 0, 0, ''));
     $div->add(html_b('Nuevo Curso Adicionado'));
     $div->add(html_br(2));
     $ret_val->add($div);
     $div1 = html_div();
     $div1->add(agt('El curso se ha adicionado correctamente en la base de datos.'));
     $div1->add(html_br(2));
     $div1->add(agt('NOMBRE DEL CUSRSO'), ' : ', $this->getViewVariable('courseName'));
     $div1->add(html_br(2), agt('DESCRIPCION'), ' : ', $this->getViewVariable('courseDescription'));
     $div1->add(new FormProcessor(new miguel_resultNewCourseForm(), 'resultNewCourse', Util::format_URLPath('main/index.php')));
     $ret_val->add($div1);
     return $ret_val;
 }
 function right_block()
 {
     $main = html_div();
     $main->set_tag_attribute('width', Session::getContextValue('mainInterfaceWidth'));
     $hr = html_hr();
     $hr->set_tag_attribute('noshade');
     $hr->set_tag_attribute('size', 2);
     //Añade la linea horizontal al contenedor principal
     $main->add($hr);
     $table = html_table(Session::getContextValue('mainInterfaceWidth'), 0, 1, 0);
     $table->set_tag_attribute('border');
     //Cabecera
     $elem1 = html_td('ptabla02', '', html_b('Perfil'));
     $elem1->set_tag_attribute('width', '50%');
     $elem2 = html_td('ptabla02', '', html_b('Conexiones'));
     $elem2->set_tag_attribute('align', 'right');
     $elem3 = html_td('ptabla02', '', html_b('%'));
     $elem3->set_tag_attribute('align', 'right');
     $table->add_row($elem1, $elem2, $elem3);
     $arrUsers = $this->getViewVariable('arrUsers');
     $iTotalCon = $this->getViewVariable('iTotalCon');
     for ($i = 0; $i < count($arrUsers); $i++) {
         $elem1 = html_td('ptabla03', '', $arrUsers[$i]['user.user_alias']);
         $elem2 = html_td('ptabla03', '', $arrUsers[$i]['countLogin']);
         $elem2->set_tag_attribute('align', 'right');
         $porc = sprintf('%.2f', $arrUsers[$i]['countLogin'] * 100 / $iTotalCon);
         $elem3 = html_td('ptabla03', '', $porc);
         $elem3->set_tag_attribute('align', 'right');
         $table->add_row($elem1, $elem2, $elem3);
     }
     $elem1 = html_td('ptabla03', '', html_b('TOTAL'));
     $elem2 = html_td('ptabla03', '', html_b($iTotalCon));
     $elem2->set_tag_attribute('align', 'right');
     $elem3 = html_td('ptabla03', '', html_b(100));
     $elem3->set_tag_attribute('align', 'right');
     $table->add_row($elem1, $elem2, $elem3);
     $main->add($table);
     return $main;
 }
Example #23
0
 function content_block()
 {
     //  Add the InfoTableCSS so the tables look right
     $this->add_head_css(new DefaultGUIDataListCSS());
     //  This allows passing arguments eithers as a GET or a POST
     $scriptargs = array_merge($_GET, $_POST);
     //  The swimmeetid is the argument which must be
     //  dealt with differently for GET and POST operations
     if (array_key_exists("swimmeetid", $scriptargs)) {
         $swimmeetid = $scriptargs["swimmeetid"];
     } else {
         if (array_key_exists("_swimmeetid", $scriptargs)) {
             $swimmeetid = $scriptargs["_swimmeetid"];
         } else {
             if (array_key_exists(FT_DB_PREFIX . "radio", $scriptargs)) {
                 $swimmeetid = $scriptargs[FT_DB_PREFIX . "radio"][0];
             } else {
                 $swimmeetid = null;
             }
         }
     }
     $container = container();
     $it = new SwimMeetInfoTable('Swim Meet Details', '500');
     $it->setSwimMeetId($swimmeetid);
     $it->BuildInfoTable(false);
     $container->add($it, html_br(2));
     //  Complex order by clause to make sure DQ and NS are shown
     //  after valid times.
     $swimresults = new SwimResultsDataList('Results', '100%', 'event_number,
         case when finals_time_ft = 0.0 then 1 else 0 end,
         finals_time_ft');
     $swimresults->set_save_vars(array('swimmeetid' => $swimmeetid));
     $div = html_div();
     $div->set_id("swimresultsgdl");
     $div->add($swimresults);
     $container->add($div);
     $container->add(FlipTurnGUIButtons::getBackHomeButtons());
     return $container;
 }
 function right_block()
 {
     $ret_val = container();
     $div = html_div();
     $div->add(html_br());
     $titulo = html_p('Tablón de anuncios');
     $titulo->set_class('ptabla01');
     $div->add($titulo);
     $status = $this->getViewVariable('status');
     switch ($status) {
         case 'menu':
         default:
             $table =& html_table(Session::getContextValue('mainInterfaceWidth'), 0, 2, 2);
             $table->add_row(html_td('ptabla02', '', $this->icon_link(Util::format_URLPath('notice/index.php', 'status=new'), Theme::getThemeImagePath('boton_siguiente.gif'), 'Nuevo Mensaje')));
             $table->add_row(html_td('ptabla02', '', $this->icon_link(Util::format_URLPath('notice/index.php', 'status=list'), Theme::getThemeImagePath('boton_siguiente.gif'), 'Ver Mensajes')));
             $div->add($table);
             $ret_val->add($div);
             break;
         case 'new':
             $ret_val->add($div);
             $ret_val->add($this->addForm('notice', 'miguel_noticeForm'));
             break;
         case 'list':
             $notice_array = $this->getViewVariable('notice_array');
             $table =& html_table(Session::getContextValue('mainInterfaceWidth'), 0, 2, 2);
             $table->add($this->add_noticeHead());
             for ($i = 0; $i < count($notice_array); $i++) {
                 $table->add($this->add_notice($notice_array[$i]['notice.author'], $notice_array[$i]['notice.subject'], $notice_array[$i]['notice.time'], $notice_array[$i]['notice.notice_id']));
             }
             $div->add($table);
             $ret_val->add($div);
             break;
         case 'show':
             $ret_val->add($this->add_noticeDetails());
             break;
     }
     return $ret_val;
 }
Example #25
0
function dashboard()
{
    //redirect to search engine
    if (isset($_POST["name"])) {
        //search by name
        header("Location: http://" . $_SERVER['HTTP_HOST'] . "/menu.php/upload/search/" . $_POST["name"]);
        die;
    }
    // Search / Upload Form template
    include_once "template/up_search.tpl";
    include_once "template/upload.tpl";
    // Pokemon Box list
    html_div(100, 0, "#812919", 30);
    echo "PokeMon Box";
    html_div_end();
    $PokemonBoxList = scandir("./pc/");
    foreach ($PokemonBoxList as $value) {
        if ($value == "." || $value == "..") {
            continue;
        }
        echo $value . "<br>";
    }
}
 function _LinksList()
 {
     $ret_val = new container();
     $div = html_div("medium-text");
     $div->add(html_br(2));
     $link = $this->getViewVariable('arr_links');
     if (is_array($link) && $link[0]['link.link_id']) {
         $ul = html_ul();
         $countLink = count($link);
         for ($i = 0; $i < $countLink; $i++) {
             $elem = container();
             Debug::oneVar($link);
             $elem->add(html_a($link[$i]["link.link_url"], $link[$i]["link.link_name"], null, "_blank"));
             $elem->add(html_a(Util::format_URLPath("links/index.php", "link_id=" . $link[$i]["link.link_id"] . "&amp;action=invalid"), "[" . agt("Enlace_roto") . "]", null, _top));
             $elem->add(html_a(Util::format_URLPath("links/index.php", "link_id=" . $link[$i]["link.link_id"] . "&amp;action=delete"), "[" . agt("Eliminar") . "]", null, _top));
             $elem->add(html_br());
             $elem->add($link[$i]["link.link_description"]);
             $ul->add($elem);
         }
         $div->add($ul);
         $div->add(html_a(Util::format_URLPath("links/index.php", "action=insert"), "[" . agt("insertar") . "]", null, _top));
         $ret_val->add($div);
     }
     return $ret_val;
 }
 function right_section()
 {
     $ret_val = html_div();
     $ret_val->set_id('content');
     $div = html_div();
     $status = $this->getViewVariable('status');
     switch ($status) {
         case 'menu':
         default:
             $div->add($this->add_head());
             $div->add(html_br(2));
             $div->add(html_hr());
             $arrMessages = $this->getViewVariable('arrMessages');
             $unreaded = count($arrMessages);
             //Si es 1 hay que mirar si no es nulo
             if ($unreaded == 1 && $arrMessages[0]['message.id'] == null) {
                 $unreaded = 0;
             }
             $div->add($this->add_sectionHead('Mensajería ' . "({$unreaded})", 'modules/email.png'));
             $div->add($this->add_inbox());
             $div->add(html_br(2));
             $div->add(html_hr());
             $notice_array = $this->getViewVariable('notice_array');
             $unreaded = count($notice_array);
             //Si es 1 hay que mirar que no sea nulo
             if ($unreaded == 1 && $notice_array[0]['notice.author'] == null) {
                 $unreaded = 0;
             }
             $div->add($this->add_sectionHead('Tablón de anuncios ' . "({$unreaded})", 'modules/announces.png'));
             $div->add($this->add_notices());
             break;
     }
     $ret_val->add($div);
     //EnvÃŒa el contenedor del bloque right para que sea renderizado por el sistema
     return $ret_val;
 }
 function _categoryTable()
 {
     $ret_val = container();
     $category = $this->getViewVariable('arr_categories');
     if (is_array($category) && $category[0]['name']) {
         $div = html_div('medium-text');
         $ul = html_ul();
         $countCategory = count($category);
         for ($i = 0; $i < $countCategory; $i++) {
             $elem = container();
             $elem->add(html_a(Util::format_URLPath('area/index.php', 'institution_id=' . $this->getViewVariable('institution_id') . '&faculty_id=' . $this->getViewVariable('faculty_id') . '&department_id=' . $category[$i]['id']), $category[$i]['name'], null, '_top'));
             $elem->add(html_small('(' . $category[$i]['num'] . ')'));
             $ul->add($elem);
         }
         $div->add($ul);
         $ret_val->add($div);
     }
     return $ret_val;
 }
 /**
  * this function returns the contents
  * of the right block.  It is already wrapped
  * in a TD
  * Solo se define right_block porque heredamos de VMenu y el left_block se encuentra ya definido por defecto con el men˙ del sistema.
  * Si heredara de miguel_VPage entonces habrÌa que definir de igual forma right_block y main_block. Esta ˙ltima es un contenedor de left_block y right_block
  * @return HTMLTag object
  */
 function right_block()
 {
     //Crea el contenedor del right_block
     $ret_val = container();
     //Vamos a ir creando los distintos elementos (Estos a su vez son tambiÈn contenedores) del contenedor principal.
     //hr es una linea horizontal de HTML.
     $hr = html_hr();
     $hr->set_tag_attribute('noshade');
     $hr->set_tag_attribute('size', 2);
     //Añade la linea horizontal al contenedor principal
     $ret_val->add($hr);
     //Crea un bloque div y le asigna la clase ul-big del CSS
     $div = html_div();
     //Añade una imagen del tema
     $div->add(Theme::getThemeImage('modules/announces.png'));
     //Incluimos texto en negrita
     $div->add(html_b('Tabl�n de anuncios'));
     //Ahora dos retornos de carro
     $div->add(html_br(2));
     //$ret_val->add($div);
     //$div = html_div('medium-text');
     $status = $this->getViewVariable('status');
     switch ($status) {
         case 'menu':
         default:
             $div->add($this->icon_link(Util::format_URLPath('notice/index.php', 'status=new'), Theme::getThemeImagePath('modules/announces.png'), 'Nuevo Mensaje'));
             $div->add(html_br(2));
             $div->add($this->icon_link(Util::format_URLPath('notice/index.php', 'status=list'), Theme::getThemeImagePath('modules/announces.png'), 'Ver Mensajes'));
             $div->add(html_br(2));
             $ret_val->add($div);
             break;
         case 'new':
             //Incluye en el Div un texto. Usa la funciÛn agt('etiqueta') para internacionalizar
             //$div->add(agt('miguelNoticeText'));
             //$div->add(html_br(2));
             $ret_val->add($div);
             //Añadimos al contenedor principal el formulario de entrada de datos
             $ret_val->add($this->addForm('notice', 'miguel_noticeForm'));
             break;
         case 'list':
             $notice_array = $this->getViewVariable('notice_array');
             for ($i = 0; $i < count($notice_array); $i++) {
                 $div->add($this->add_notice($notice_array[$i]['notice.author'], $notice_array[$i]['notice.subject'], $notice_array[$i]['notice.time'], $notice_array[$i]['notice.notice_id']));
                 $div->add(html_br(2));
             }
             $ret_val->add($div);
             break;
         case 'show':
             $ret_val->add($this->add_noticeDetails());
             break;
     }
     //EnvÌa el contenedor del bloque right para que sea renderizado por el sistema
     return $ret_val;
 }
 function _courseList($isGuest)
 {
     $ret_val = new container();
     $div = html_div("medium-text");
     $course = $this->getViewVariable('arr_courses');
     if (is_array($course) && $course[0]['course_id']) {
         $ul = html_ul();
         $countCourse = count($course);
         for ($i = 0; $i < $countCourse; $i++) {
             $elem = container();
             $elem->add(html_a(Util::format_URLPath("course/index.php", "course=" . $course[$i]["course_id"]), $course[$i]["course_name"], null, "_top"));
             $elem->add(html_br());
             $elem->add($course[$i]["course_description"]);
             $elem->add(html_br());
             if (!$isGuest) {
                 if (!$course[$i]["course_isRegister"]) {
                     $elem->add(html_a(Util::format_URLPath("subscribe/index.php", "course_id=" . $course[$i]["course_id"]), agt('miguel_subscribe'), null, '_top'));
                 } else {
                     $elem->add(html_a(Util::format_URLPath("unsubscribe/index.php", "course_id=" . $course[$i]["course_id"]), agt('miguel_unsubscribe'), null, '_top'));
                 }
             }
             $ul->add($elem);
         }
         $div->add($ul);
         $ret_val->add($div);
     }
     return $ret_val;
 }