Пример #1
0
 public function getPayments()
 {
     $OUT = '';
     $OUT .= '<p><table cellpadding="3" cellspacing="1" border="0">' . '<tr' . getRowColor() . '><th class="devinfo">¹</th><th class="devinfo">From</th><th class="devinfo">To</th><th class="devinfo">Amount</th><th class="devinfo">Batch</th></tr>';
     $i = 0;
     foreach ($GLOBALS['payments'] as $payment) {
         $OUT .= '<tr' . getRowColor() . '><td class="devinfo">' . ++$i . '</td><td class="devinfo">' . $payment['from'] . '</td><td class="devinfo">' . $payment['to'] . '</td><td class="devinfo">' . $payment['amount'] . '</td><td class="devinfo">' . $payment['batch'] . '</td></tr>';
     }
     $OUT .= '<tr' . getRowColor() . '><td class="devinfo"><b>Total:</b></td><td class="devinfo" colspan="4">' . $i . '</td></tr>';
     $OUT .= '</table></p>';
     return $OUT;
 }
Пример #2
0
         echo "Successfully added. Please wait...<META HTTP-EQUIV=\"refresh\" content=\"3;URL=index.php?action=addmeta\" />";
         die;
     } else {
         $pagetest = mysql_query("select * from keywords where page='" . $postedVals["page"] . "'");
         $rowss = mysql_num_rows($pagetest);
         if ($rowss > 0) {
             $errMsg = "Meta data for the current page has been added already";
         } else {
             $resAddUpdate = $mySqlObj->queryUpdate("keywords", $allVals, "", "");
             echo "Successfully added. Please wait...<META HTTP-EQUIV=\"refresh\" content=\"3;URL=index.php?action=addmeta&type=add\" />";
             die;
         }
     }
 }
 $rowColor = getRowColor(0);
 $rowColor2 = getRowColor(1);
 $bodyVals[0][0] = array("value" => "<b>Title : <b>", "align" => "right", "width" => "30%", "style" => $rowColor2);
 $bodyVals[0][1] = array("value" => $disElementHTML["page"], "align" => "left", "width" => "70%", "style" => $rowColor2);
 $bodyVals[1][0] = array("value" => "<b>Title : <b>", "align" => "right", "width" => "30%", "style" => $rowColor2);
 $bodyVals[1][1] = array("value" => $disElementHTML["title"], "align" => "left", "width" => "70%", "style" => $rowColor2);
 $bodyVals[2][0] = array("value" => "<b>Description : <b>", "align" => "right", "width" => "30%", "style" => $rowColor);
 $bodyVals[2][1] = array("value" => $disElementHTML["description"], "align" => "left", "width" => "70%", "style" => $rowColor);
 $bodyVals[3][0] = array("value" => "<b>Keywords : <b>", "align" => "right", "width" => "30%", "style" => $rowColor2);
 $bodyVals[3][1] = array("value" => $disElementHTML["keyword"], "align" => "left", "width" => "70%", "style" => $rowColor2);
 //$bodyVals[4][0] = array("value" => $disElementHTML["data"]);
 $bodyVals[4][1] = array("value" => $disForm["submit"]);
 $genBodyTableMain = genHTMLTable(count($bodyVals), 2, $bodyVals, "100%", "", 8, 0, 0);
 $bodyVals1[0][0] = array("value" => "Metadata", "style" => "maintitle");
 $bodyVals1[1][0] = array("value" => $errMsg, "style" => "tinyredtext", "align" => "center");
 $bodyVals1[2][0] = array("value" => $disForm["form"]["start"] . $genBodyTableMain . $disForm["form"]["end"]);
 $genBodyTable = genHTMLTable(count($bodyVals1), 1, $bodyVals1, "100%", "", 3, 0, 0);
Пример #3
0
    public function out($title = '')
    {
        $html_form = '<table cellpadding="3" cellspacing="1" align="center">';
        if (!empty($title)) {
            $html_form .= '<caption>' . $title . '</caption>';
        }
        foreach ($this->form->rows as $row) {
            switch ($row['type']) {
                case 'form':
                    $html_form .= "\n" . '<form ' . $this->form->rows[0]['text'] . '>';
                    break;
                case 'field':
                    $html_form .= '
						<tr ' . getRowColor() . ' valign="top">
							<td>' . $row['label'] . '</td>
							<td>' . $row['text'] . '</td>
						</tr>';
                    break;
                case 'submit':
                    $html_form .= '<tr><td colspan="2" align="center">' . $row['text'] . '</td></tr>';
                    break;
            }
        }
        $html_form .= '</form>';
        $html_form .= '</table>';
        return $html_form;
    }