Example #1
0
    echo sprintf('<td>%s</td>', GWF_Form::checkbox(sprintf('mod[%s]', $module->getName()), $checked));
    echo sprintf('<td>%s</td>', $module->display('module_name'));
    echo sprintf('<td>%s</td>', Module_Payment::displayPrice($price));
    echo sprintf('<td>%s</td>', implode(', ', array_keys($module->getDependencies())));
    echo sprintf('<td>%s</td>', $strMethods);
    echo GWF_Table::rowEnd();
}
echo GWF_Table::end();
// Design table
$headers = array(array(), array($tLang->Lang('th_design_name')), array($tLang->Lang('th_design_price')));
echo GWF_Table::start();
echo GWF_Table::displayHeaders2($headers);
foreach ($tVars['designs'] as $design => $price) {
    if ($client !== false) {
        $checked = $client->ownsDesign($design);
    } else {
        $checked = isset($_POST['purchase']) ? isset($_POST['design'][$design]) : $price == 0;
    }
    echo GWF_Table::rowStart();
    echo sprintf('<td>%s</td>', GWF_Form::checkbox(sprintf('design[%s]', $design), $checked));
    echo sprintf('<td>%s</td>', $design);
    echo sprintf('<td>%s</td>', Module_Payment::displayPrice($price));
    echo GWF_Table::rowEnd();
}
echo GWF_Table::end();
echo '<div class="gwf_buttons_outer">' . PHP_EOL;
echo '<div class="gwf_buttons">' . PHP_EOL;
echo GWF_Form::submit('purchase', $tLang->lang('btn_purchase')) . PHP_EOL;
echo '</div>' . PHP_EOL;
echo '</div>' . PHP_EOL;
echo GWF_Form::end();
Example #2
0
<?php

$headers = array(array($tLang->lang('th_pmf_name'), 'pmf_name', 'ASC'), array($tLang->lang('th_pmf_count'), 'pmf_count', 'DESC'), array());
echo GWF_Form::start($tVars['folder_action']);
echo GWF_CSRF::hiddenForm('PM_REM_FOLDER');
echo GWF_Table::start();
echo GWF_Table::displayHeaders1($headers, $tVars['sort_url']);
foreach ($tVars['folders'] as $row) {
    $foldername = $row->display('pmf_name');
    $folderid = $row->getVar('pmf_id');
    $href = $row->getOverviewHREF();
    echo GWF_Table::rowStart();
    echo GWF_Table::column(sprintf('<a href="%s">%s</a>', $href, $foldername), 'ri');
    echo GWF_Table::column(sprintf('<a href="%s">%s</a>', $href, $row->getVar('pmf_count')), 'gwf_num');
    echo GWF_Table::column(GWF_Form::checkbox("folder[{$folderid}]", false));
    echo GWF_Table::rowEnd();
}
echo GWF_Table::rowStart();
echo GWF_Table::column(GWF_Form::submit('delete_folder', $tLang->lang('btn_delete')), 'ri', 3);
echo GWF_Table::rowEnd();
echo GWF_Table::end();
echo GWF_Form::end();
?>

Example #3
0
 /**
  * Display Form.
  * @param $action
  * @return string html
  */
 public static function displayForm($action = 'wizard.php', GWF_LangTrans $lang)
 {
     self::init($lang);
     $back = sprintf('<form method="post" action="%s">', htmlspecialchars($action));
     $back .= '<table>';
     $color_toggle = -1;
     $current_section = '';
     foreach (self::$vars as $var) {
         list($type, $section, $define, $value, $comment) = $var;
         if ($section !== $current_section) {
             $current_section = $section;
             $color_toggle++;
             # = 1 - $color_toggle;
             $back .= self::displayDivRow($color_toggle, $current_section);
         }
         $back .= self::displayRow($color_toggle, $var);
     }
     # Buttons
     $buttons = GWF_Form::submit('test_db', 'Test DB');
     $buttons .= GWF_Form::submit('write_config', 'Write Config');
     $back .= sprintf('<tr class="gwfinstall%d"><td colspan="3">%s</td></tr>', $color_toggle, $buttons) . PHP_EOL;
     $back .= '</table>' . PHP_EOL;
     $back .= '</form>' . PHP_EOL;
     return $back;
 }