Example #1
0
 function flush()
 {
     $thisclass_string = wra_adminmenu::getbaseclass();
     $saveid = -1;
     if (WRA::ir('id')) {
         $saveid = WRA::r('id');
     }
     $pid = -1;
     if (WRA::ir('pid')) {
         $pid = WRA::r('pid');
     }
     if ($thisclass_string != '') {
         if (wra_adminpage::isedit()) {
             $languages = wra_lang::getlist();
             // WRA::debug($languages);
             // die();
             wra_admintable::flusheditHead($this);
             foreach ($languages as $l0) {
                 $code = '$wt=' . $thisclass_string . '::edittable(' . $saveid . ',' . $pid . ',' . $l0->alias . ');';
                 eval($code);
                 $wt->flushedit($this);
                 if (count($wt->subtables) > 0) {
                     foreach ($wt->subtables as $st) {
                         if ($st->subtypeedit) {
                             $st->subtable = true;
                             $st->flushedit($this);
                         } else {
                             $st->subtable = true;
                             $st->flush();
                         }
                     }
                 }
             }
         } else {
             $code = '$wt=' . $thisclass_string . '::admintable(' . $saveid . ',' . $pid . ');';
             eval($code);
             if ($wt->headertext != '') {
                 WRA::e('<h2>' . $wt->headertext);
                 if ($pid != -1 && $pid != 0) {
                 }
                 WRA::e('</h2>');
             }
             $wt->flush();
             if (count($wt->subtables) > 0) {
                 foreach ($wt->subtables as $st) {
                     $st->useheader = false;
                     $st->subtable = true;
                     $st->flush();
                 }
             }
         }
     }
 }
Example #2
0
        ?>
                                    <?php 
        if ($this->cap->addnewitem != "") {
            if (!strpos(WRA::getcurpage(), "edit")) {
                $addlink = wra_adminmenu::getassoc(WRA::getcurpage()) . '&id=-1';
            } else {
                $addlink = WRA::getcurpage() . '&id=-1';
            }
            if (WRA::ir("pid")) {
                $addlink .= "&pid=" . WRA::r("pid");
            }
            $backlink = wra_adminmenu::getassoc(WRA::getcurpage()) . '&id=-1';
            if ($this->cap->addnewitemlink != "") {
                $backlink .= $this->cap->addnewitemlink;
            }
            if (WRA::ir('pid')) {
                $backlink .= "&pid=" . WRA::r('pid');
            }
            if ($this->useadd_button) {
                ?>
                                        <div class="add_block_inner"><a
                                                href="<?php 
                WRA::e($addlink . $this->cap->addnewitemlink);
                ?>
"><?php 
                WRA::e($this->cap->addnewitem);
                ?>
</a></div>


                                        <?php