private function build_table()
    {
        $table_model = new SQLHTMLTableModel(DownloadSetup::$download_table, 'table', array(new HTMLTableColumn(LangLoader::get_message('form.name', 'common'), 'name'), new HTMLTableColumn(LangLoader::get_message('category', 'categories-common'), 'id_category'), new HTMLTableColumn(LangLoader::get_message('author', 'common'), 'display_name'), new HTMLTableColumn(LangLoader::get_message('form.date.creation', 'common'), 'creation_date'), new HTMLTableColumn(LangLoader::get_message('status', 'common'), 'approbation_type'), new HTMLTableColumn('')), new HTMLTableSortingRule('creation_date', HTMLTableSortingRule::DESC));
        $table = new HTMLTable($table_model);
        $table_model->set_caption($this->lang['download.management']);
        $results = array();
        $result = $table_model->get_sql_results('download
			LEFT JOIN ' . DB_TABLE_COMMENTS_TOPIC . ' com ON com.id_in_module = download.id AND com.module_id = \'download\'
			LEFT JOIN ' . DB_TABLE_AVERAGE_NOTES . ' notes ON notes.id_in_module = download.id AND notes.module_name = \'download\'
			LEFT JOIN ' . DB_TABLE_NOTE . ' note ON note.id_in_module = download.id AND note.module_name = \'download\' AND note.user_id = ' . AppContext::get_current_user()->get_id() . '
			LEFT JOIN ' . DB_TABLE_MEMBER . ' member ON member.user_id = download.author_user_id', array('*', 'download.id'));
        foreach ($result as $row) {
            $downloadfile = new DownloadFile();
            $downloadfile->set_properties($row);
            $category = $downloadfile->get_category();
            $user = $downloadfile->get_author_user();
            $edit_link = new LinkHTMLElement(DownloadUrlBuilder::edit($downloadfile->get_id()), '', array('title' => LangLoader::get_message('edit', 'common')), 'fa fa-edit');
            $delete_link = new LinkHTMLElement(DownloadUrlBuilder::delete($downloadfile->get_id()), '', array('title' => LangLoader::get_message('delete', 'common'), 'data-confirmation' => 'delete-element'), 'fa fa-delete');
            $user_group_color = User::get_group_color($user->get_groups(), $user->get_level(), true);
            $author = $user->get_id() !== User::VISITOR_LEVEL ? new LinkHTMLElement(UserUrlBuilder::profile($user->get_id()), $user->get_display_name(), !empty($user_group_color) ? array('style' => 'color: ' . $user_group_color) : array(), UserService::get_level_class($user->get_level())) : $user->get_display_name();
            $results[] = new HTMLTableRow(array(new HTMLTableRowCell(new LinkHTMLElement(DownloadUrlBuilder::display($category->get_id(), $category->get_rewrited_name(), $downloadfile->get_id(), $downloadfile->get_rewrited_name()), $downloadfile->get_name()), 'left'), new HTMLTableRowCell(new LinkHTMLElement(DownloadUrlBuilder::display_category($category->get_id(), $category->get_rewrited_name()), $category->get_name())), new HTMLTableRowCell($author), new HTMLTableRowCell($downloadfile->get_creation_date()->format(Date::FORMAT_DAY_MONTH_YEAR_HOUR_MINUTE)), new HTMLTableRowCell($downloadfile->get_status()), new HTMLTableRowCell($edit_link->display() . $delete_link->display())));
        }
        $table->set_rows($table_model->get_number_of_matching_rows(), $results);
        $this->view->put('table', $table->display());
    }
 private function build_table()
 {
     $table = new SQLHTMLTableModel(DB_TABLE_MEMBER, __CLASS__, array(new HTMLTableColumn('pseudo', 'display_name'), new HTMLTableColumn('email'), new HTMLTableColumn('inscrit le', 'registration_date'), new HTMLTableColumn('messages'), new HTMLTableColumn('derniere connexion'), new HTMLTableColumn('messagerie')), new HTMLTableSortingRule('user_id', HTMLTableSortingRule::ASC));
     $table->set_caption('Liste des membres');
     $options = array('horn' => 'Horn', 'coucou' => 'Coucou', 'teston' => 'teston');
     $table->add_filter(new HTMLTableEqualsFromListSQLFilter('display_name', 'filter1', 'login Equals', $options));
     $table->add_filter(new HTMLTableBeginsWithTextSQLFilter('display_name', 'filter2', 'login Begins with (regex)', '`^(?!%).+$`'));
     $table->add_filter(new HTMLTableBeginsWithTextSQLFilter('display_name', 'filter3', 'login Begins with (no regex)'));
     $table->add_filter(new HTMLTableEndsWithTextSQLFilter('display_name', 'filter4', 'login Ends with (regex)', '`^(?!%).+$`'));
     $table->add_filter(new HTMLTableEndsWithTextSQLFilter('display_name', 'filter5', 'login Ends with (no regex)'));
     $table->add_filter(new HTMLTableLikeTextSQLFilter('display_name', 'filter6', 'login Like (regex)', '`^toto`'));
     $table->add_filter(new HTMLTableLikeTextSQLFilter('display_name', 'filter7', 'login Like (no regex)'));
     $table->add_filter(new HTMLTableGreaterThanSQLFilter('user_id', 'filter8', 'id >'));
     $table->add_filter(new HTMLTableGreaterThanSQLFilter('user_id', 'filter9', 'id > (lower=3)', 3));
     $table->add_filter(new HTMLTableGreaterThanSQLFilter('user_id', 'filter10', 'id > (upper=3)', HTMLTableNumberComparatorSQLFilter::NOT_BOUNDED, 3));
     $table->add_filter(new HTMLTableGreaterThanSQLFilter('user_id', 'filter11', 'id > (lower=1, upper=3)', 1, 3));
     $table->add_filter(new HTMLTableLessThanSQLFilter('user_id', 'filter12', 'id <'));
     $table->add_filter(new HTMLTableGreaterThanOrEqualsToSQLFilter('user_id', 'filter13', 'id >='));
     $table->add_filter(new HTMLTableLessThanOrEqualsToSQLFilter('user_id', 'filter14', 'id <='));
     $table->add_filter(new HTMLTableEqualsToSQLFilter('user_id', 'filter15', 'id ='));
     $html_table = new HTMLTable($table);
     $results = array();
     $result = $table->get_sql_results();
     foreach ($result as $row) {
         $results[] = new HTMLTableRow(array(new HTMLTableRowCell($row['display_name']), new HTMLTableRowCell($row['show_email'] == 1 ? '<a href="mailto:' . $row['email'] . '" class="basic-button smaller">Mail</a>' : '&nbsp;'), new HTMLTableRowCell(Date::to_format($row['registration_date'], Date::FORMAT_DAY_MONTH_YEAR_HOUR_MINUTE)), new HTMLTableRowCell(!empty($row['posted_msg']) ? $row['posted_msg'] : '0'), new HTMLTableRowCell(!empty($row['last_connection_date']) ? Date::to_format($row['last_connection_date'], Date::FORMAT_DAY_MONTH_YEAR) : LangLoader::get_message('never', 'main')), new HTMLTableRowCell('<a href="' . Url::to_rel('/user/pm.php?pm=' . $row['user_id']) . '" class="basic-button smaller">MP</a>')));
     }
     $html_table->set_rows($table->get_number_of_matching_rows(), $results);
     return $html_table;
 }
Exemplo n.º 3
0
 public function check($touch = false)
 {
     $mbox = $this->connection();
     #echo "<h1>Nachrichten in INBOX</h1><div style=\"overflow:auto;max-height:400px;\"><pre>";
     $MC = imap_check($mbox);
     $T = new HTMLTable(1, $touch ? "Mails" : "");
     $T->setTableStyle("font-size:11px;");
     $T->useForSelection();
     $start = $MC->Nmsgs - 10;
     if ($start < 1) {
         $start = 1;
     }
     $result = imap_fetch_overview($mbox, "{$start}:{$MC->Nmsgs}", 0);
     $result = array_reverse($result);
     foreach ($result as $overview) {
         #print_r($overview);
         $T->addRow(array("\n\t\t\t\t<small style=\"color:grey;float:right;\">" . Util::CLDateParser($overview->udate) . "</small>\n\t\t\t\t" . str_replace("\"", "", $this->decodeBlubb($overview->from)) . "<br />\n\t\t\t\t<small style=\"color:grey;\">" . substr($this->decodeBlubb($overview->subject), 0, 50) . "</small>"));
         $T->addCellEvent(1, "click", "\$j('#MailFrame').attr('src', './interface/rme.php?class=MailCheck&constructor=" . $this->getID() . "&method=showMailBody&parameters=\\'{$overview->uid}\\'');");
     }
     imap_close($mbox);
     #echo "</pre></div>";
     $BC = "";
     if ($touch) {
         $BC = new Button("Fenster\nschließen", "stop");
         $BC->style("float:right;margin:10px;");
         $BC->onclick(OnEvent::closePopup("MailCheck"));
     }
     echo "<div style=\"float:right;width:300px;\">";
     echo $BC;
     echo "<p>{$MC->Nmsgs} Nachricht" . ($MC->Nmsgs == 1 ? "" : "en") . "</p><div style=\"clear:both;\"></div>";
     echo $T;
     echo "</div>";
     echo "\n\t\t\t<div style=\"border-right-style:solid;border-right-width:1px;width:699px;\" class=\"borderColor1\">\n\t\t\t\t<iframe id=\"MailFrame\" style=\"border:0px;width:699px;height:520px;\" src=\"./fheME/MailCheck/Home/index.html\"></iframe>\n\t\t\t</div>";
     echo "<div style=\"clear:both;\"></div>";
 }
Exemplo n.º 4
0
 public function details($UserID)
 {
     $p = mUserdata::getPluginSpecificData("mStatistik");
     $ps = mUserdata::getPluginSpecificData("mAkquise");
     if (!isset($p["pluginSpecificCanUseControlling"]) and $UserID != Session::currentUser()->getID() and !isset($ps["pluginSpecificCanSeeFrom{$UserID}"])) {
         return "";
     }
     $U = Users::getUsersArray(null, true);
     $AC = $this->data();
     $AC->setOrderV3("anzahl", "DESC");
     $AC->addJoinV3("Adresse", "TodoClassID", "=", "AdresseID");
     $AC->setGroupV3("CONCAT(TodoClass, TodoClassID)");
     $AC->addAssocV3("TodoUserID", "=", $UserID);
     $AC->setFieldsV3(array("firma", "vorname", "nachname", "COUNT(*) AS anzahl", "AdresseID", "TodoClass"));
     $T = new HTMLTable(2, "Termine " . $U[$UserID] . " vom {$this->startDatum} bis {$this->endDatum}");
     $T->setColWidth(1, 30);
     #$T->setColWidth(3, 20);
     $T->addColStyle(1, "text-align:right;");
     #$T->setTableID("termineTable");
     while ($A = $AC->n()) {
         #$B = new Button("Akquise anzeigen", "./images/i2/telephone.png", "icon");
         #$B->onclick("\$j('#termineTable .lastSelected').removeClass('lastSelected'); \$j(this).parent().parent().addClass('lastSelected'); ".Akquise::getWindowAction($A->A("AdresseID"), 0));
         #onclick="Popup.load('Akquise', 'mAkquise', '-1', 'showMinTelPopup', Array('65143','0'), '', 'edit', '{width: 730, top:$j(\'#navTabsWrapper\').outerHeight() + 20, left: contentManager.maxWidth() < 800 + 730 ? contentManager.maxWidth() - 740 : 800}');"
         if ($A->A("TodoClass") != "WAdresse") {
             $T->addRow(array($A->A("anzahl") . "x", "Ohne Adresse"));
             continue;
         }
         if ($A->A("TodoClass") == "WAdresse" and !$A->A("AdresseID")) {
             $T->addRow(array($A->A("anzahl") . "x", "Adresse gelöscht"));
             continue;
         }
         $T->addRow(array($A->A("anzahl") . "x", $A->A("firma") != "" ? $A->A("firma") : $A->A("vorname") . " " . $A->A("nachname")));
     }
     echo $T;
 }
 function getHTML($id)
 {
     $gui = new HTMLGUI();
     $gui->VersionCheck("mNavigation");
     $U = new mUserdata();
     $U = $U->getUDValue("selectedDomain");
     if ($U == null) {
         $t = new HTMLTable(1);
         $t->addRow("Sie haben keine Domain ausgewählt.<br /><br />Bitte wählen Sie eine Domain im Domain-Plugin, indem Sie auf das graue Kästchen in der Liste auf der rechten Seite klicken.");
         return $t->getHTML();
     }
     $this->addOrderV3("DomainID", "ASC");
     $this->addOrderV3("sort", "ASC");
     if ($U != null) {
         $this->addAssocV3("DomainID", "=", "{$U}");
     }
     if ($this->A == null) {
         $this->lCV3($id);
     }
     $gui->setName(get_parent_class($this));
     if ($this->collector != null) {
         $gui->setAttributes($this->collector);
     }
     $gui->setDisplayGroup("DomainID");
     $gui->setDisplayGroupParser("mNavigationGUI::DGParser");
     $gui->setShowAttributes(array("name", "sort"));
     $gui->setCollectionOf($this->collectionOf);
     try {
         return $gui->getBrowserHTML($id);
     } catch (Exception $e) {
     }
 }
    private function build_table()
    {
        $table_model = new SQLHTMLTableModel(CalendarSetup::$calendar_events_table, 'table', array(new HTMLTableColumn(LangLoader::get_message('form.title', 'common'), 'title'), new HTMLTableColumn(LangLoader::get_message('category', 'categories-common'), 'id_category'), new HTMLTableColumn(LangLoader::get_message('author', 'common'), 'display_name'), new HTMLTableColumn(LangLoader::get_message('date', 'date-common'), 'start_date'), new HTMLTableColumn($this->lang['calendar.titles.repetition']), new HTMLTableColumn(LangLoader::get_message('status.approved', 'common'), 'approved'), new HTMLTableColumn('')), new HTMLTableSortingRule('start_date', HTMLTableSortingRule::DESC));
        $table = new HTMLTable($table_model);
        $table_model->set_caption($this->lang['calendar.config.events.management']);
        $table_model->add_permanent_filter('parent_id = 0');
        $results = array();
        $result = $table_model->get_sql_results('event
			LEFT JOIN ' . CalendarSetup::$calendar_events_content_table . ' event_content ON event_content.id = event.content_id
			LEFT JOIN ' . DB_TABLE_MEMBER . ' member ON member.user_id = event_content.author_id');
        foreach ($result as $row) {
            $event = new CalendarEvent();
            $event->set_properties($row);
            $category = $event->get_content()->get_category();
            $user = $event->get_content()->get_author_user();
            $edit_link = new LinkHTMLElement(CalendarUrlBuilder::edit_event(!$event->get_parent_id() ? $event->get_id() : $event->get_parent_id()), '', array('title' => LangLoader::get_message('edit', 'common')), 'fa fa-edit');
            $delete_link = new LinkHTMLElement(CalendarUrlBuilder::delete_event($event->get_id()), '', array('title' => LangLoader::get_message('delete', 'common'), 'data-confirmation' => !$event->belongs_to_a_serie() ? 'delete-element' : ''), 'fa fa-delete');
            $user_group_color = User::get_group_color($user->get_groups(), $user->get_level(), true);
            $author = $user->get_id() !== User::VISITOR_LEVEL ? new LinkHTMLElement(UserUrlBuilder::profile($user->get_id()), $user->get_display_name(), !empty($user_group_color) ? array('style' => 'color: ' . $user_group_color) : array(), UserService::get_level_class($user->get_level())) : $user->get_display_name();
            $br = new BrHTMLElement();
            $results[] = new HTMLTableRow(array(new HTMLTableRowCell(new LinkHTMLElement(CalendarUrlBuilder::display_event($category->get_id(), $category->get_rewrited_name(), $event->get_id(), $event->get_content()->get_rewrited_title()), $event->get_content()->get_title()), 'left'), new HTMLTableRowCell(new SpanHTMLElement($category->get_name(), array('style' => $category->get_id() != Category::ROOT_CATEGORY && $category->get_color() ? 'color:' . $category->get_color() : ''))), new HTMLTableRowCell($author), new HTMLTableRowCell(LangLoader::get_message('from_date', 'main') . ' ' . $event->get_start_date()->format(Date::FORMAT_DAY_MONTH_YEAR_HOUR_MINUTE) . $br->display() . LangLoader::get_message('to_date', 'main') . ' ' . $event->get_end_date()->format(Date::FORMAT_DAY_MONTH_YEAR_HOUR_MINUTE)), new HTMLTableRowCell($event->belongs_to_a_serie() ? $this->lang['calendar.labels.repeat.' . $event->get_content()->get_repeat_type()] . ' - ' . $event->get_content()->get_repeat_number() . ' ' . $this->lang['calendar.labels.repeat_times'] : LangLoader::get_message('no', 'common')), new HTMLTableRowCell($event->get_content()->is_approved() ? LangLoader::get_message('yes', 'common') : LangLoader::get_message('no', 'common')), new HTMLTableRowCell($edit_link->display() . $delete_link->display())));
        }
        $table->set_rows($table_model->get_number_of_matching_rows(), $results);
        $this->view->put('table', $table->display());
    }
Exemplo n.º 7
0
 public function getHTML($id, $page)
 {
     $this->addAssocV3("DateiClassID", "=", $this->classID);
     $this->addAssocV3("DateiClass", "=", $this->className);
     $this->lCV3($id);
     $gui = new HTMLGUI();
     $gui->setName("Dateien");
     $gui->setAttributes($this->collector);
     $gui->setCollectionOf($this->collectionOf);
     $gui->setShowAttributes(array("DateiName"));
     $gui->setParser("DateiName", "mDateiGUI::nameParser", array("\$DateiPath", "\$DateiIsDir", "\$DateiSize"));
     $gui->setIsDisplayMode(true);
     if (!$this->viewOnly) {
         $gui->setDeleteInDisplayMode(true);
     }
     $t = new HTMLTable(1);
     if ($this->classID != null and !$this->viewOnly) {
         $B = new Button("Datei\nhinzufügen", "computer");
         $B->select(true, "mFile", $this->onAddClass != null ? $this->onAddClass : "'+lastLoadedLeftPlugin+'", $this->classID, "addFile");
         $B->customSelect("contentRight", $this->classID, "mFile", "{$this->onAddClass}.addFile");
         $t->addRow($B);
         #$t->addRow(array("<input onclick=\"loadFrameV2('contentRight','mFile','mFileGUI;selectionMode:multiSelection,".($this->onAddClass != null ? $this->onAddClass : "'+lastLoadedLeftPlugin+'").",$this->classID,addFile,'+lastLoadedRightPlugin+',".($this->onReloadFrame != null ? $this->onReloadFrame : "contentLeft").",".($this->onReloadClass != null ? $this->onReloadClass : "'+lastLoadedLeftPlugin+'").",".($this->onReloadID != null ? $this->onReloadID : $this->classID)."');\" type=\"button\" class=\"backgroundColor3 bigButton\" style=\"background-image:url(./images/navi/computer.png);\" value=\"Datei\nhinzufügen\" />"));
     }
     $gui->setJSEvent("onDelete", $this->onDeleteFunction == null ? "function() { contentManager.reloadFrame('contentLeft'); }" : $this->onDeleteFunction);
     try {
         if ($this->viewOnly and $this->numLoaded() == 0) {
             return "";
         }
         return $t->getHTML() . $gui->getBrowserHTML($id);
     } catch (Exception $e) {
     }
 }
Exemplo n.º 8
0
 function getHTML($id, $page)
 {
     $gui = new HTMLGUI();
     $gui->VersionCheck("Templates");
     $U = new mUserdata();
     $U = $U->getUDValue("selectedDomain");
     if ($U == null) {
         $t = new HTMLTable(1);
         $t->addRow("Sie haben keine Domain ausgewählt.<br /><br />Bitte wählen Sie eine Domain im Domain-Plugin, indem Sie auf das graue Kästchen in der Liste auf der rechten Seite klicken.");
         return $t->getHTML();
     }
     $this->addAssocV3("TemplateDomainID", "=", $U);
     $this->addAssocV3("TemplateDomainID", "=", "0", "OR");
     $this->addOrderV3("templateType", "ASC");
     #if($this->A == null) $this->lCV3($id);
     $gui->showFilteredCategoriesWarning($this->filterCategories(), $this->getClearClass());
     $gesamt = $this->loadMultiPageMode($id, $page, 0);
     $gui->setMultiPageMode($gesamt, $page, 0, "contentRight", str_replace("GUI", "", get_class($this)));
     $gui->setName("Template");
     if ($this->collector != null) {
         $gui->setAttributes($this->collector);
     }
     $gui->setShowAttributes(array("aktiv", "name"));
     $gui->setParser("aktiv", "TemplatesGUI::aktivParser", array("\$aid"));
     $gui->setColWidth("aktiv", "20px");
     $gui->setDisplayGroup("templateType", $this->getAvailableCategories());
     $gui->setCollectionOf($this->collectionOf);
     try {
         return $gui->getBrowserHTML($id);
     } catch (Exception $e) {
     }
 }
Exemplo n.º 9
0
 public function getAngebote($data)
 {
     if (!$this->loggedIn) {
         return "TIMEOUT";
     }
     $html = "";
     $T = new HTMLTable(2);
     #, "Bitte wählen Sie einen Lieferschein");
     $T->setTableStyle("width:100%;margin-top:10px;");
     $T->setColWidth(1, 130);
     $T->useForSelection(false);
     $T->maxHeight(400);
     $AC = anyC::get("GRLBM", "isA", "1");
     $AC->addJoinV3("Auftrag", "AuftragID", "=", "AuftragID");
     $AC->addAssocV3("UserID", "=", Session::currentUser()->getID());
     $AC->addAssocV3("status", "=", "open");
     #$AC->addOrderV3("datum", "DESC");
     $AC->addOrderV3("nummer", "DESC");
     #$AC->setLimitV3(100);
     #$AC->addJoinV3("Adresse", "t2.AdresseID", "=", "AdresseID");
     $i = 0;
     while ($B = $AC->n()) {
         $Adresse = new Adresse($B->A("AdresseID"));
         $T->addRow(array("<span style=\"font-size:20px;font-weight:bold;\">" . $B->A("prefix") . $B->A("nummer") . "</span><br><span style=\"color:grey;\">" . Util::CLDateParser($B->A("datum")) . "</span>", $Adresse->getHTMLFormattedAddress()));
         $T->addCellStyle(1, "vertical-align:top;");
         $T->addRowStyle("cursor:pointer;border-bottom:1px solid #ccc;");
         #if($i % 2 == 1)
         #	$T->addRowStyle ("background-color:#eee;");
         $T->addRowEvent("click", "\n\t\t\t\t\$(this).addClass('selected');\n\t\t\t\t\n\t\t\t\tCustomerPage.rme('getAuftrag', {GRLBMID: " . $B->getID() . "}, function(transport){ \n\t\t\t\t\t\tif(transport == 'TIMEOUT') { document.location.reload(); return; } \n\t\t\t\t\t\t\$('#contentLeft').html(transport); \n\t\t\t\t\t}, \n\t\t\t\t\tfunction(){},\n\t\t\t\t\t'POST');\n\t\t\t\t\t\n\t\t\t\tCustomerPage.rme('getArtikel', {GRLBMID: " . $B->getID() . ", query : '', KategorieID: ''}, function(transport){ \n\t\t\t\t\t\tif(transport == 'TIMEOUT') { document.location.reload(); return; } \n\t\t\t\t\t\t\$('#contentRight').html(transport); \n\t\t\t\t\t\t\$('.selected').removeClass('selected');\n\t\t\t\t\t\t\$('#frameSelect').hide(); \$('#frameEdit').show();\n\t\t\t\t\t}, \n\t\t\t\t\tfunction(){},\n\t\t\t\t\t'POST');");
         $i++;
     }
     $html .= $T;
     return $html;
 }
Exemplo n.º 10
0
 public function show()
 {
     $this->begin();
     $this->top_search("Recommendations");
     $this->menu('member', 'recommendations');
     $this->howitworks();
     $recommendations = $this->member->getReferrals();
     ?>
     <div id="div_status" class="status">
         <span id="span_status" class="status"></span>
     </div>
     
     <div id="div_recommendations">
     <?php 
     if (empty($recommendations)) {
         ?>
         <div class="empty_results">No recommedations made.</div>
     <?php 
     } else {
         $recommendations_table = new HTMLTable('recommendations_table', 'recommendations');
         $recommendations_table->set(0, 0, "<a class=\"sortable\" onClick=\"sort_by('referrals', 'referred_on');\">Recommended On</a>", '', 'header');
         $recommendations_table->set(0, 1, "<a class=\"sortable\" onClick=\"sort_by('referrals', 'job');\">Position</a>", '', 'header');
         $recommendations_table->set(0, 2, "<a class=\"sortable\" onClick=\"sort_by('referrals', 'candidate_name');\">Candidate</a>", '', 'header');
         $recommendations_table->set(0, 3, "&nbsp;", '', 'header actions');
         foreach ($recommendations as $i => $recommendation) {
             // referred on
             $recommendations_table->set($i + 1, 0, $recommendation['formatted_referred_on'], '', 'cell');
             // position
             $job_details = '<div class="candidate_name"><a href="../job/' . $recommendation['job_id'] . '">' . htmlspecialchars_decode(stripslashes($recommendation['job'])) . '</a></div><br/>';
             $employer = $recommendation['employer'];
             if (!is_null($recommendation['alternate_employer']) && !empty($recommendation['alternate_employer'])) {
                 $employer = $recommendation['alternate_employer'];
             }
             $job_details .= '<div class="small_contact"><span style="font-weight: bold;">Employer: </span>' . htmlspecialchars_decode(stripslashes($employer)) . '</div>';
             $recommendations_table->set($i + 1, 1, $job_details, '', 'cell');
             // candidate
             $candidate = '<div class="candidate_name">' . htmlspecialchars_decode(stripslashes($recommendation['candidate_name'])) . '</div><br/>';
             $candidate .= '<div class="small_contact"><span style="font-weight: bold;">E-mail:</span><a href="mailto:' . $recommendation['candidate_email'] . '"> ' . $recommendation['candidate_email'] . '</a></div>';
             $recommendations_table->set($i + 1, 2, $candidate, '', 'cell');
             // action
             $action = 'Processed';
             if ($recommendation['tab'] == 'buf') {
                 $action = '<a class="no_link" onClick="delete_buffered(\'' . $recommendation['id'] . '\');">delete</a>';
             }
             $recommendations_table->set($i + 1, 3, $action, '', 'cell actions');
         }
         echo $recommendations_table->get_html();
     }
     ?>
     </div>
     
     <?php 
 }
Exemplo n.º 11
0
 public function addSettingPopup()
 {
     $T = new HTMLTable(2);
     $T->setColWidth(1, 20);
     $T->useForSelection(false);
     $S = new System(1);
     $B = new Button("Eintrag erstellen", "./images/i2/cart.png", "icon");
     foreach ($S->types as $k => $v) {
         $T->addRow(array($B, $v->name));
         $T->addRowEvent("click", OnEvent::rme($this, "addSettingNew", array("'{$k}'"), "function(t){ " . OnEvent::closePopup("mSystem") . OnEvent::reload("Right") . " contentManager.loadFrame('contentLeft', 'System', t.responseText); }"));
     }
     echo $T;
 }
 private function build_table()
 {
     $table_model = new HTMLTableModel('table', array(new HTMLTableColumn($this->lang['smiley']), new HTMLTableColumn(LangLoader::get_message('code', 'main')), new HTMLTableColumn('')), new HTMLTableSortingRule(''), HTMLTableModel::NO_PAGINATION);
     $table = new HTMLTable($table_model);
     $table_model->set_caption($this->lang['smiley_management']);
     $results = array();
     foreach (SmileysCache::load()->get_smileys() as $code => $row) {
         $edit_link = new LinkHTMLElement(AdminSmileysUrlBuilder::edit($row['idsmiley']), '', array('title' => LangLoader::get_message('edit', 'common')), 'fa fa-edit');
         $delete_link = new LinkHTMLElement(AdminSmileysUrlBuilder::delete($row['idsmiley']), '', array('title' => LangLoader::get_message('delete', 'common'), 'data-confirmation' => 'delete-element'), 'fa fa-delete');
         $results[] = new HTMLTableRow(array(new HTMLTableRowCell(new ImgHTMLElement(Url::to_rel('/images/smileys/') . $row['url_smiley'], array('id' => 'smiley-' . $row['idsmiley'] . '-img', 'alt' => ''))), new HTMLTableRowCell($code), new HTMLTableRowCell($edit_link->display() . $delete_link->display())));
     }
     $table->set_rows(count($results), $results);
     $this->view->put('table', $table->display());
 }
Exemplo n.º 13
0
 function getHTML($id)
 {
     $U = new mUserdata();
     $U = $U->getUDValue("selectedDomain");
     if ($U == null) {
         $t = new HTMLTable(1);
         $t->addRow("Sie haben keine Domain ausgewählt.<br /><br />Bitte wählen Sie eine Domain im Domain-Plugin, indem Sie auf das graue Kästchen in der Liste auf der rechten Seite klicken.");
         return $t->getHTML();
     }
     $Domain = new Domain($U);
     $Domain->loadMe();
     $variables = array("domainTemplate", "contentTemplate", "naviTemplate", "pageTemplate");
     $variables["domainTemplate"] = array("TITLE", "DESCRIPTION", "NAVIGATION", "HEADER", "PAGE");
     $variables["contentTemplate"] = array("TEXT", "IMAGE", "DOWNLOADS", "CONTENTID", "HANDLER");
     $variables["naviTemplate"] = array("LINK", "URL", "TEXT");
     $variables["pageTemplate"] = array("HEADER", "CONTENT", "DOMAIN");
     $variables["dlTemplate"] = array("TEXT", "DOWNLOADS");
     #$this->setParser("html","Util::base64Parser");
     if ($this->A == null and $id != -1) {
         $this->loadMe();
     }
     if ($id == -1) {
         $this->A = $this->newAttributes();
     }
     $gui = new HTMLGUI();
     $gui->setObject($this);
     $gui->setName("Template");
     $TG = new TemplatesGUI();
     $options = $TG->getAvailableCategories();
     $gui->setType("templateType", "select");
     $gui->setOptions("templateType", array_keys($options), array_values($options));
     $gui->setInputJSEvent("templateType", "onchange", "CMSTemplate.updateVariables(this);");
     $gui->setInputJSEvent("templateType", "onkeyup", "CMSTemplate.updateVariables(this);");
     $gui->setLabel("templateType", "Typ");
     $gui->setType("html", "TextEditor64");
     $gui->setType("TemplateDomainID", "radio");
     $gui->setLabel("TemplateDomainID", "Domain");
     $gui->setOptions("TemplateDomainID", array("0", $U), array("alle", "nur " . $Domain->getA()->title));
     $gui->hideAttribute("TemplateID");
     $gui->setType("aktiv", "hidden");
     $gui->setStandardSaveButton($this, "Templates");
     $vars = "";
     foreach ($variables as $k => $v) {
         if (is_array($variables[$k])) {
             $vars .= "<p id=\"{$k}Variables\" style=\"" . ($this->A->templateType == $k ? "" : "display:none;") . "\">%%%" . implode("%%%<br />%%%", $variables[$k]) . "%%%</p>";
         }
     }
     $html = "\n\t\t\t<script type=\"text/javascript\">\n\t\t\t\tnew Draggable('TBVarsContainer',{handle:'TBVarsHandler', zindex: 2000});\n\t\t\t\toldVarSelected = '" . ($this->A->templateType != null ? $this->A->templateType : "null") . "';\n\t\t\t</script>\n\t\t\t<div \n\t\t\t\tstyle=\"position:absolute;z-index:2000;left:450px;width:200px;border-width:1px;border-style:solid;" . (isset($variables[$this->A->templateType]) ? "" : "display:none;") . "\"\n\t\t\t\tclass=\"backgroundColor0 borderColor1\"\n\t\t\t\tid=\"TBVarsContainer\"\n\t\t\t>\n\t\t\t<div class=\"cMHeader backgroundColor1\" id=\"TBVarsHandler\">Variablen:</div>\n\t\t\t<div>\n\t\t\t\t<p><small>Sie können folgende Variablen in Ihrem HTML verwenden (bitte beachen Sie Groß- und Kleinschreibung):</small></p>\n\t\t\t\t{$vars}\n\t\t\t</div>\n\t\t\t</div>";
     return $html . $gui->getEditHTML();
 }
 private function build_table()
 {
     $table_model = new SQLHTMLTableModel(DB_TABLE_MEMBER, 'table', array(new HTMLTableColumn($this->lang['display_name'], 'display_name'), new HTMLTableColumn($this->lang['email']), new HTMLTableColumn($this->lang['registration_date'], 'registration_date'), new HTMLTableColumn($this->lang['messages'], 'posted_msg'), new HTMLTableColumn($this->lang['last_connection'], 'last_connection_date'), new HTMLTableColumn($this->lang['private_message'])), new HTMLTableSortingRule('display_name', HTMLTableSortingRule::ASC));
     $table = new HTMLTable($table_model);
     $results = array();
     $result = $table_model->get_sql_results('m LEFT JOIN ' . DB_TABLE_INTERNAL_AUTHENTICATION . ' ia ON ia.user_id = m.user_id');
     foreach ($result as $row) {
         $posted_msg = !empty($row['posted_msg']) ? $row['posted_msg'] : '0';
         $group_color = User::get_group_color($row['groups'], $row['level']);
         $author = new LinkHTMLElement(UserUrlBuilder::profile($row['user_id']), $row['display_name'], !empty($group_color) ? array('style' => 'color: ' . $group_color) : array(), UserService::get_level_class($row['level']));
         $results[] = new HTMLTableRow(array(new HTMLTableRowCell($author), new HTMLTableRowCell($row['show_email'] == 1 ? new LinkHTMLElement('mailto:' . $row['email'], $this->lang['email'], array(), 'basic-button smaller') : ''), new HTMLTableRowCell(Date::to_format($row['registration_date'], Date::FORMAT_DAY_MONTH_YEAR)), new HTMLTableRowCell($posted_msg), new HTMLTableRowCell(!empty($row['last_connection_date']) ? Date::to_format($row['last_connection_date'], Date::FORMAT_DAY_MONTH_YEAR) : LangLoader::get_message('never', 'main')), new HTMLTableRowCell(new LinkHTMLElement(UserUrlBuilder::personnal_message($row['user_id']), 'PM', array(), 'basic-button smaller'))));
     }
     $table->set_rows($table_model->get_number_of_matching_rows(), $results);
     $this->view->put('table', $table->display());
 }
Exemplo n.º 15
0
 function EasyTableList($tablename, $cols, $parsetarget, $pkname, $delmsg, $delmsgcol)
 {
     // show list
     // create html table
     $table = new HTMLTable("0", "100%");
     $table->AddRowAsHeading($cols);
     $all = $this->app->DB->SelectTable($tablename, $cols);
     $table->AddField($all);
     $action = $this->app->Secure->GetGET("action", "alpha");
     $module = $this->app->Secure->GetGET("module", "alpha");
     $table->AddCompleteCol(0, "<a href=\"index.php?module={$module}&action={$action}&id=%col%\">bearbeiten</a>");
     $table->AddCompleteCol(0, "<a href=\"#\" onclick=\"str = confirm('{$delmsg}');\n      if(str!='' & str!=null) \n      window.document.location.href='index.php?module={$module}&action={$action}&id=%col%&formaction=delete';\">\n      loeschen</a>", $delmsgcol);
     $table->ChangingRowColors('#ffffff', '#dddddd');
     $this->app->Tpl->Set($parsetarget, $table->Get());
 }
Exemplo n.º 16
0
 public function getHTML($id)
 {
     $allowedUsers = Environment::getS("allowedUsers", null);
     $this->addOrderV3("name");
     if ($this->A == null) {
         $this->lCV3($id);
     }
     $up = new anyC();
     $up->setCollectionOf("User");
     $up->addAssocV3("password", "!=", ";;;-1;;;");
     $up->lCV3();
     if ($up->numLoaded() > 0 and $id == -1) {
         return "\n\t\t<table>\n\t\t\t<colgroup>\n\t\t\t\t<col class=\"backgroundColor3\" />\n\t\t\t</colgroup>\n\t\t\t<tr>\n\t\t\t\t<td><input onclick=\"rme('Users','','convertPasswords','','contentManager.reloadFrameRight();');\" type=\"button\" style=\"float:right;background-image:url(./images/navi/keys.png);\" class=\"bigButton backgroundColor2\" value=\"Passwörter\nkonvertieren\" />In Ihrer Datenbank befinden sich noch unkonvertierte Passwörter.</td>\n\t\t\t</tr>\n\t\t</table>";
     }
     $T = new HTMLTable(1, "Application Server");
     $I = new HTMLInput("AppServer", "text", mUserdata::getGlobalSettingValue("AppServer", ""));
     $I->onEnter("contentManager.rmePCR('Users', '-1', 'saveAppServer', [this.value], ' ');");
     if ($allowedUsers === null) {
         $T->addRow($I . "<br /><small>Wenn Sie einen Application Server bertreiben, tragen Sie hier bitte die URL ein, um die Benutzer mit diesem Server zu authorisieren.</small>");
     }
     $gui = new HTMLGUI();
     $gui->setObject($this);
     $gui->setName("Benutzer");
     $gui->setCollectionOf($this->collectionOf, "Benutzer");
     #$gui->setObject($this);
     $gui->setParser("isAdmin", "UsersGUI::isAdminParser");
     $gui->setColWidth("isAdmin", "20px");
     #$gui->hideAttribute("password");
     #$gui->hideAttribute("SHApassword");
     #$gui->hideAttribute("language");
     $gui->setShowAttributes(array("name", "username", "isAdmin"));
     $g = "";
     if (strstr($_SERVER["SCRIPT_FILENAME"], "demo")) {
         $UA = $_SESSION["S"]->getCurrentUser()->getA();
         if ($UA->name != "Installations-Benutzer") {
             $g = "In der Demo können keine Benutzer geändert werden!";
             $gui->setIsDisplayMode(true);
         }
     }
     $TR = new HTMLTable(1);
     if ($allowedUsers !== null and $id == -1) {
         $B = new Button("", "notice", "icon");
         $B->style("float:left;margin-right:10px;");
         $TR->addRow(array($B . "Bitte beachten Sie: Sie können insgesamt {$allowedUsers} Benutzer ohne Admin-Rechte anlegen."));
     }
     $gui->customize($this->customizer);
     return $TR . $g . $gui->getBrowserHTML($id) . ($id == -1 ? $T : "");
 }
Exemplo n.º 17
0
 public function getHTML($id)
 {
     $this->addJoinV3("User", "AutoLoginUserID", "=", "UserID");
     $gui = new HTMLGUI();
     #$gui->VersionCheck("mAutoLogin");
     $this->lCV3($id);
     $gui->setName("AutoLogin");
     $gui->setObject($this);
     $gui->setShowAttributes(array("username", "AutoLoginIP", "AutoLoginApp"));
     $t = new HTMLTable(1);
     $t->addRow("<img src=\"./images/navi/warning.png\" style=\"float: left; margin-right: 10px;\" />Dieses Plugin ist möglicherweise ein Sicherheitsrisiko!");
     try {
         return ($id == -1 ? $t : "") . $gui->getBrowserHTML($id);
     } catch (Exception $e) {
     }
 }
Exemplo n.º 18
0
 public function getHTML($id)
 {
     $gui = new HTMLGUI();
     $gui->VersionCheck("mTool");
     $FB = new FileBrowser();
     $FB->addDir("../PM/GoD");
     $files = $FB->getAsLabeledArray("iPMTool", ".class.php", true);
     $tab = new HTMLTable(2, "Tools");
     $tab->setColWidth(1, "20px");
     foreach ($files as $key => $value) {
         $B = new Button("", "./images/i2/edit.png");
         $B->type("icon");
         $B->onclick("loadFrameV2('contentLeft','{$value}');");
         $tab->addRow(array($B, $key));
     }
     return $tab;
 }
Exemplo n.º 19
0
 public function getHTML($id)
 {
     $gui = new HTMLGUI();
     $gui->VersionCheck($this->getClearClass());
     $t = new HTMLTable(2, $this->tableLabel);
     $t->addColStyle(1, "width:20px;");
     $FB = new FileBrowser();
     $FB->addDir($this->directory);
     $w = $FB->getAsLabeledArray("iFileBrowser", ".class.php");
     foreach ($w as $k => $v) {
         $B = new Button("", "./images/i2/edit.png");
         $B->type("icon");
         $B->onclick("contentManager.loadFrame('contentLeft','{$v}');");
         $t->addRow(array($B, "{$k}"));
     }
     return $t->getHTML();
 }
Exemplo n.º 20
0
 function addRow($content)
 {
     parent::addRow($content);
     #$this->addRowClass("backgroundColor0");
     #$this->addCellStyle(1, "background-color:transparent;");
     #$this->addColStyle(1, "background-color:transparent;");
     #$this->addRowStyle("background-color:transparent;");
 }
Exemplo n.º 21
0
 /**
  * Popup zur Konfiguration eines Servers.
  */
 public function getConfigPopup($echo = true)
 {
     // Button
     $BCreate = new Button("Server\nhinzufügen", "new");
     $BCreate->rmePCR("mxCal", "-1", "createNewServer", array(), OnEvent::reloadPopup("mxCal"));
     $htmlTableButton = new HTMLTable(1);
     $htmlTableButton->addRow($BCreate);
     // Liste der konfigurierten Server
     $userId = $_SESSION["S"]->getCurrentUser()->getID();
     $T = new HTMLTable(1, "xCal Server");
     $BDeleteRaw = new Button("Eintrag löschen", "./images/i2/delete.gif", "icon");
     $BDeleteRaw->style("float: right;");
     $serverList = anyC::get("xCal", "xCalUserID", $userId);
     $counter = 0;
     while ($S = $serverList->getNextEntry()) {
         $BDelete = clone $BDeleteRaw;
         $BDelete->onclick("deleteClass('xCal','" . $S->getID() . "', function() { Popup.refresh('mxCal'); }, 'Eintrag wirklich löschen?');");
         $F = new HTMLForm("xCal_" . $S->A("xCalID"), array("xCalName", "xCalUrl", "xCalServerActive"));
         $F->getTable()->setColWidth(1, 120);
         $F->setValues($S);
         $F->setLabel("xCalName", "Bezeichnung");
         $F->setLabel("xCalUrl", "URL");
         $F->setLabel("xCalServerActive", "Für den Import verwenden");
         $F->setType("xCalServerActive", "checkbox");
         $F->useRecentlyChanged();
         $F->setSaveClass("xCal", $S->getID(), "''");
         $display = "none";
         if ($S->A("xCalName") == "" && $S->A("xCalUrl") == "") {
             $display = "";
         }
         $div = "<div\n\t\t\t\t\tonmouseover=\"this.className = 'backgroundColor3';\" \n\t\t\t\t\tonmouseout=\"this.className = '';\" \n\t\t\t\t\tstyle=\"padding:3px;cursor:pointer;\" \n\t\t\t\t\tonclick=\"if(\$('APDetails" . $S->getID() . "').style.display == 'none') new Effect.BlindDown('APDetails" . $S->getID() . "'); else new Effect.BlindUp('APDetails" . $S->getID() . "');\">\n\t\t\t\t\t{$BDelete}<span id=\"APPosition" . $S->getID() . "\">" . ($S->A("xCalName") != "" ? $S->A("xCalName") : "Neuer Server") . "</span>&nbsp;<br />\n\t\t\t\t\t<small style=\"color:grey;\" id=\"APName" . $S->getID() . "\">" . ($S->A("xCalServerActive") == "1" ? "Import aktiviert" : "Import deaktiviert") . "&nbsp;</small>\n\t\t\t\t</div>";
         $T->addRow(array($div . "<div id=\"APDetails" . $S->getID() . "\" style=\"display:" . $display . ";\">" . $F . "</div>"));
         $T->addRowClass("backgroundColor0");
         $T->addCellClass(1, "borderColor1");
         $counter++;
     }
     if ($counter == 0) {
         $T->addRow("Keine Server eingetragen!");
     }
     if ($echo == "" || $echo === true) {
         echo $htmlTableButton . $T;
     } else {
         return $htmlTableButton . $T;
     }
 }
Exemplo n.º 22
0
 function getHTML($id)
 {
     $this->loadMeOrEmpty();
     $gui = new HTMLGUI();
     $gui->setObject($this);
     $gui->setName("Starsystem");
     $gui->setStandardSaveButton($this);
     $B = new Button("create\nplanets", "./PM/Planet/Terran01.png");
     $B->rme("Starsystem", $this->ID, "createPlanets", "");
     $tab = new HTMLTable(1);
     $tab->addRow($B);
     $gui->setType("StarsystemGalaxyID", "hidden");
     $gui->setLabel("StarsystemName", "Name");
     $gui->setLabel("StarsystemX", "X");
     $gui->setLabel("StarsystemY", "Y");
     $gui->setLabel("StarsystemRotation", "Rotation");
     return $tab . $gui->getEditHTML();
 }
Exemplo n.º 23
0
 function getHTML($id)
 {
     $this->loadMeOrEmpty();
     $gui = new HTMLGUI();
     $gui->setObject($this);
     $gui->setName("Domain");
     if ($id != -1) {
         $Seiten = new SeitenGUI();
         $Seiten->addAssocV3("DomainID", "=", $this->getID());
         $Seiten->setFieldsV3(array("SeiteID", "IF(name = '', header , name) AS name"));
         $gui->selectWithCollection("startseite", $Seiten, "name");
     } else {
         $gui->setParser("startseite", "DomainGUI::startseiteParser");
     }
     $T = new TemplatesGUI();
     $T->addAssocV3("templateType", "=", "domainTemplate");
     $gui->selectWithCollection("TemplateID", $T, "name");
     $gui->setStandardSaveButton($this);
     #$gui->setSaveButtonValues(get_parent_class($this),$this->ID,"Domains");
     $gui->setShowAttributes(array("TemplateID", "url", "DomainDefaultSpracheID", "startseite", "title", "header", "umleitung", "permalinkPrefix", "horizontalNav"));
     if (Session::isPluginLoaded("mSprache")) {
         $mS = new anyC();
         $mS->setCollectionOf("Sprache");
         $gui->selectWithCollection("DomainDefaultSpracheID", $mS, "SpracheIdentifier", "keine Auswahl");
     } else {
         $gui->setType("DomainDefaultSpracheID", "hidden");
     }
     $gui->setLabel("DomainDefaultSpracheID", "Sprache");
     $gui->setLabel("url", "Domains");
     $gui->setLabel("title", "Titelzeile");
     $gui->setLabel("header", "Header");
     $gui->setLabel("permalinkPrefix", "Permalink-Präfix");
     $gui->setLabel("horizontalNav", "horizontale Navigation");
     $gui->setType("horizontalNav", "checkbox");
     $gui->setFieldDescription("horizontalNav", "Subkategorien in der Navigation werden nicht zwischen den Einträgen angezeigt sondern am Ende angehängt.");
     $gui->setFieldDescription("umleitung", "<b>www-Umleitung</b><br />Anfragen an Adressen ohne www-Subdomain werden auf die www-subdomain umgeleitet. Also es würde http://example.com an http://www.example.com umgeleitet. Nicht jedoch http://test.example.com<br /><br /><b>erster Eintrag</b><br />Alle Anfragen werden auf den ersten Eintrag der Liste umgeleitet.");
     $gui->setType("umleitung", "select");
     $gui->setOptions("umleitung", array("0", "1", "2"), array("keine", "www-Umleitung", "erster Eintrag"));
     $gui->setType("url", "textarea");
     $gui->setFieldDescription("url", "geben Sie eine Domain pro Zeile an oder * für eine beliebige Domain");
     $tab = new HTMLTable(1);
     $tab->addRow("Das Permalink-Präfix wird vor den Permalink geschrieben, wenn er für eine Seite eingetragen wurde.<br /><br />Wenn Sie also \"page-\" als Präfix angeben, wird der Permalink für die Startseite so aussehen (wenn der Permalink für die Startseite \"Startseite\" lautet) page-Startseite.<br /><br />Sie müssen diesen Permalink dann noch mit mod_rewrite umschreiben. Mit präfix \"page-\" dann zum Beispiel:<pre style=\"font-size:9px;\">RewriteEngine on\nRewriteRule ^page-([a-zA-Z0-9-_]*)\$ ?permalink=\$1</pre>");
     return $gui->getEditHTML() . $tab;
 }
Exemplo n.º 24
0
 function calc($land, $kontonummer, $bankleitzahl, $ibanField, $bicField)
 {
     if ($kontonummer == "" or $bankleitzahl == "") {
         Red::alertD("Bitte tragen Sie Bankleitzahl und Kontonummer ein");
     }
     $url = "http://www.iban.de/iban-berechnen.html";
     $ch = curl_init();
     curl_setopt($ch, CURLOPT_HTTPHEADER, array('User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:26.0) Gecko/20100101 Firefox/26.0', 'Referer: http://www.iban.de/iban-berechnen.html', 'Content-Type: application/x-www-form-urlencoded; charset=UTF-8', 'X-Requested-With: XMLHttpRequest'));
     curl_setopt($ch, CURLOPT_URL, $url);
     curl_setopt($ch, CURLOPT_POST, 1);
     curl_setopt($ch, CURLOPT_POSTFIELDS, "ibanrechnerCountry={$land}&ibanrechnerBlz={$bankleitzahl}&ibanrechnerKonto={$kontonummer}&ibanToolkit=ibanrechner");
     curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
     $result = curl_exec($ch);
     curl_close($ch);
     $I = new IBAN(trim(str_replace("Die IBAN lautet: ", "", strip_tags($result))));
     $iban = $I->MachineFormat();
     $url = "https://www.s-bausparkasse.at/portal/if_ajax.asp";
     $ch = curl_init();
     curl_setopt($ch, CURLOPT_URL, $url);
     curl_setopt($ch, CURLOPT_POST, 1);
     curl_setopt($ch, CURLOPT_POSTFIELDS, "mode=calc.ibanbic.listofbic&cuid=&alt_iban=&iban={$iban}&rechnername=IBAN%2FBIC-Rechner&currentpageid=87&berechnungsdaten=&autocalc=&getresult=&country={$land}&bank={$bankleitzahl}&account=" . str_pad($kontonummer, 10, "0", STR_PAD_LEFT));
     curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
     $result = curl_exec($ch);
     curl_close($ch);
     $ex = explode("&&&", $result);
     $ex[0] = str_replace("listofbic==", "", strip_tags(trim($ex[0])));
     $ex[1] = str_replace("iban==", "", trim($ex[1]));
     $T = new HTMLTable(3, "Gefundene Ergebnisse");
     $T->weight("light");
     $T->maxHeight(400);
     $T->useForSelection(false);
     $T->setColWidth(1, 20);
     $T->addHeaderRow(array("", "BIC", "IBAN"));
     foreach (explode("\n", $ex[0]) as $bic) {
         $B = new Button("Diese Kombination verwenden", "arrow_right", "iconic");
         $T->addRow(array($B, trim($bic), $ex[1]));
         $T->addRowEvent("click", "\$j('[name={$ibanField}]').val('{$ex['1']}'); \$j('[name={$bicField}]').val('" . trim($bic) . "'); " . OnEvent::closePopup("IBANCalc"));
     }
     echo $T;
     #echo "<pre>";
     #echo htmlentities(print_r($ex, true));
     #echo($result);
     #echo "</pre>";
 }
Exemplo n.º 25
0
 function getHTML($id)
 {
     $gui = new HTMLGUI();
     $this->addJoinV3("FhemLocation", "FhemPresetLocationID", "=", "FhemLocationID");
     $this->addOrderV3("FhemLocationName");
     $this->lCV3($id);
     $gui->setName("Preset");
     $gui->setObject($this);
     $gui->setCollectionOf("FhemPreset", "Preset");
     #$gui->setIsDisplayMode(true);
     #$gui->setEditInDisplayMode(true, "contentLeft");
     $gui->setShowAttributes(array("FhemLocationName", "FhemPresetName"));
     $t = new HTMLTable(1);
     $t->addRow("You'll have to use the \"register settings\"-button in the devices-menu to make this presets known to the server.");
     try {
         return ($id == -1 ? $t : "") . $gui->getBrowserHTML($id);
     } catch (Exception $e) {
     }
 }
Exemplo n.º 26
0
 function ldapUsersPopup()
 {
     $T = "";
     try {
         $AD = new LoginAD();
         $AD->getUsers();
         $T = new HTMLTable(2);
         $T->setColWidth(1, 20);
         $T->maxHeight(400);
         $T->useForSelection(false);
         $B = new Button("Eintrag bearbeiten", "./images/i2/edit.png", "icon");
         while ($U = $AD->n()) {
             $T->addRow(array($B, $U->A("name")));
             $T->addRowEvent("click", OnEvent::frame("contentLeft", "User", $U->getID()));
         }
     } catch (Exception $e) {
     }
     echo $T;
 }
Exemplo n.º 27
0
 function getHTML($id)
 {
     $this->loadMeOrEmpty();
     $gui = new HTMLGUI();
     $gui->setObject($this);
     $gui->setName("Preset");
     $gui->selectWithCollection("FhemPresetServerID", new mFhemServerGUI(), "FhemServerName");
     $gui->setLabel("FhemPresetServerID", "Server");
     $gui->setLabel("FhemPresetName", "Name");
     $gui->setType("FhemPresetHide", "checkbox");
     $gui->setLabel("FhemPresetHide", "Hide?");
     $gui->setType("FhemPresetNightOnly", "checkbox");
     $gui->setLabel("FhemPresetNightOnly", "Night only?");
     $gui->setLabel("FhemPresetLocationID", "Location");
     $gui->setLabel("FhemPresetRunOn", "run on");
     $gui->settype("FhemPresetLocationID", "select");
     $gui->selectWithCollection("FhemPresetLocationID", new mFhemLocationGUI(), "FhemLocationName");
     $gui->setFieldDescription("FhemPresetRunOn", "The event that triggers this Preset. For example HomeStatus:here will trigger this Preset when the dummy 'HomeStatus' is set to 'here'. The Preset will create its own dummy if this field is empty.");
     $gui->setStandardSaveButton($this, "mFhemPreset");
     #$gui->setIsDisplayMode(true);
     #$gui->setShowAttributes(array("name"));
     $gui->setShowAttributes(array("FhemPresetServerID", "FhemPresetLocationID", "FhemPresetName", "FhemPresetRunOn", "FhemPresetHide", "FhemPresetNightOnly"));
     $desc = new HTMLTable(1);
     $desc->addRow("For the \"Night only\"-option to work correctly you might want to set <code>{sunrise_coord(\"10.873799\",\"48.699495\",\"Europe/Berlin\")}</code> in the <code>fhem.cfg</code>-file. With your own coordinates/timezone of course.");
     if ($id == -1) {
         return $gui->getEditHTML() . $desc;
     }
     $_SESSION["BPS"]->registerClass("mFhemSelection");
     $_SESSION["BPS"]->setACProperty("selectionServerID", $this->A->FhemPresetServerID);
     $B = new Button("add Device", "./fheME/Fhem/fhem.png");
     $B->select("false", "mFhem", "FhemPreset", $this->ID, "addDevice");
     $BW = new Button("add custom", "backup");
     $BW->rmePCR("FhemPreset", $this->ID, "addWait", "", "contentManager.reloadFrame('contentLeft');");
     $BW->style("float:right;");
     $t = new HTMLTable(1);
     $t->addRow($BW . $B);
     $_SESSION["CurrentAppPlugins"]->addClass("Presets", "mFhemPreset");
     $mFE = new mFhemEventGUI();
     $mFE->addJoinV3("Fhem", "FhemEventFhemID", "=", "FhemID");
     $mFE->addAssocV3("FhemEventPresetID", "=", $this->ID);
     return $gui->getEditHTML() . $desc . "<div style=\"height:30px;\"></div>" . $t . $mFE->getHTML(-1) . "<div style=\"height:30px;\"></div>";
 }
Exemplo n.º 28
0
 public function setPath()
 {
     $bps = $this->getMyBPSData();
     #Aspect::registerOnetimePointCut("aboveList", "GUIFactory::getContainer", "FileManagerGUI::adviceAboveList");
     $rootDir = null;
     if ($bps != -1 and isset($bps["root"])) {
         $rootDir = preg_replace("/^([A-Z])%/", "\\1:", $bps["root"]);
     }
     #echo $rootDir;
     if ($rootDir != null) {
         $T = new HTMLTable(1);
         #$rel = "specifics/$rootDir";
         #$root = Util::getRootPath().$rel;
         $root = FileStorage::getFilesDir() . $rootDir;
         $_SESSION["BPS"]->setProperty("FileManagerGUI", "path", preg_replace("/^([A-Z]):/", "\\1%", $root));
         $_SESSION["BPS"]->setProperty("FileManagerGUI", "root", preg_replace("/^([A-Z]):/", "\\1%", $root));
         $F = new File($root);
         $F->loadMe();
         if ($F->getA() == null) {
             if (is_writable(FileStorage::getFilesDir())) {
                 mkdir($root);
             } else {
                 $B = new Button("", "stop");
                 $B->type("icon");
                 $B->style("float:left;margin-right:10px;");
                 $T->addRow($B . "Das Verzeichnis <code>{$rel}</code> existiert nicht und kann nicht automatisch angelegt werden, da keine Schreibberechtigung für <code>specifics</code> vorliegt.");
                 return $T;
             }
         }
     }
     $bps = $this->getMyBPSData();
     //go again
     #print_r($bps);
     if (isset($bps["path"]) and strpos($bps["path"], $bps["root"]) === false) {
         $bps["path"] = preg_replace("/^([A-Z])%/", "\\1:", $bps["root"]);
     }
     #$bps["root"];
     if ($bps != -1 and isset($bps["path"])) {
         $this->setDir(preg_replace("/^([A-Z])%/", "\\1:", $bps["path"]));
     }
     return true;
 }
 private function build_table()
 {
     $table_model = new SQLHTMLTableModel(PREFIX . 'errors_404', 'table', array(new HTMLTableColumn($this->lang['404_error_requested_url']), new HTMLTableColumn($this->lang['404_error_from_url']), new HTMLTableColumn($this->lang['404_error_times'], 'times', 'col-small'), new HTMLTableColumn(LangLoader::get_message('delete', 'common'), '', 'col-small')), new HTMLTableSortingRule('times', HTMLTableSortingRule::DESC));
     $table = new HTMLTable($table_model, 'table-fixed error-list404');
     $table_model->set_caption($this->lang['404_list']);
     $results = array();
     $result = $table_model->get_sql_results();
     foreach ($result as $row) {
         $delete_link = new LinkHTMLElement(AdminErrorsUrlBuilder::delete_404_error($row['id']), '', array('title' => LangLoader::get_message('delete', 'common'), 'data-confirmation' => 'delete-element'), 'fa fa-delete');
         $results[] = new HTMLTableRow(array(new HTMLTableRowCell(new LinkHTMLElement($row['requested_url'], $row['requested_url'], array('title' => $this->lang['404_error_requested_url']))), new HTMLTableRowCell(new LinkHTMLElement($row['from_url'], $row['from_url'], array('title' => $this->lang['404_error_from_url']))), new HTMLTableRowCell($row['times']), new HTMLTableRowCell($delete_link->display())));
     }
     $table->set_rows($table_model->get_number_of_matching_rows(), $results);
     if ($table_model->get_number_of_matching_rows()) {
         $this->build_form();
         $this->view->put('FORM', $this->form->display());
         $this->view->put('table', $table->display());
     } else {
         $this->view->put('MSG', MessageHelper::display(LangLoader::get_message('no_item_now', 'common'), MessageHelper::SUCCESS, 0, true));
     }
 }
Exemplo n.º 30
0
 public function checkAllEpisodes($returnValues = false, $newFiles = null)
 {
     $ac = new anyC();
     $ac->setCollectionOf("Folge");
     $ac->addAssocV3("SerieID", "=", $this->getID());
     $ac->addAssocV3("wanted", "=", "1");
     $ac->addOrderV3("season");
     $ac->addOrderV3("episode");
     if (!$returnValues) {
         $T = new HTMLTable(5);
     }
     $R = array();
     if ($newFiles != null) {
         $newFound = $this->findNewEpisodes($newFiles);
     }
     while ($E = $ac->getNextEntry()) {
         $c = $E->check($this);
         if ($c[0] === true) {
             continue;
         }
         $continue = false;
         if ($newFiles != null) {
             foreach ($newFound as $NE) {
                 if ($NE["season"] * 1 == $E->A("season") * 1 and $NE["episode"] * 1 == $E->A("episode") * 1) {
                     $continue = true;
                 }
             }
         }
         if ($continue) {
             continue;
         }
         $R[] = $E;
         if (!$returnValues) {
             $T->addRow(array("S" . $E->A("season") . "E" . $E->A("episode"), $E->A("name"), $c[0] ? "ok" : "", Util::formatByte($c[1]), $c[2]));
         }
     }
     if ($returnValues) {
         return $R;
     }
     echo "<div style=\"overflow:auto;max-height:400px;\">" . $T . "</div>";
 }