当前位置: 首页>>代码示例>>PHP>>正文


PHP getBadgerTranslation2函数代码示例

本文整理汇总了PHP中getBadgerTranslation2函数的典型用法代码示例。如果您正苦于以下问题:PHP getBadgerTranslation2函数的具体用法?PHP getBadgerTranslation2怎么用?PHP getBadgerTranslation2使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了getBadgerTranslation2函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: getNavigation

    public static function getNavigation($callerBadgerRoot)
    {
        global $badgerDb;
        NavigationFromDB::$callerBadgerRoot = $callerBadgerRoot;
        $settings = new UserSettings($badgerDb);
        $itemTypes = array('i' => 'item', 'm' => 'menu', 's' => 'separator');
        $sql = 'SELECT navi_id, parent_id, menu_order, item_type, item_name, tooltip, icon_url, command
			FROM navi
			ORDER BY parent_id, menu_order';
        $res =& $badgerDb->query($sql);
        $menus = array();
        $row = array();
        while ($res->fetchInto($row, DB_FETCHMODE_ASSOC)) {
            $menuId = $row['parent_id'];
            //create containing menu if it does not exist
            if (!isset($menus[$menuId])) {
                $menus[$menuId] = array();
            }
            //fill most of the fields
            $menus[$menuId][] = array('type' => $itemTypes[$row['item_type']], 'name' => getBadgerTranslation2("Navigation", $row['item_name']), 'tooltip' => $row['tooltip'], 'icon' => BADGER_ROOT . "/tpl/" . $settings->getProperty("badgerTemplate") . "/Navigation/" . $row['icon_url'], 'command' => NavigationFromDB::replaceBadgerRoot($row['command']));
            //if current row is a menu
            if ($row['item_type'] == 'm') {
                //create sub-menu if it does not exist
                if (!isset($menus[$row['navi_id']])) {
                    $menus[$row['navi_id']] = array();
                }
                //add menu field to the previously created item and assign a reference to the proper
                //sub-menu to it
                $menus[$menuId][count($menus[$menuId]) - 1]['menu'] =& $menus[$row['navi_id']];
            }
        }
        //All sub-menus are within element 0 as references
        return $menus[0];
    }
开发者ID:BackupTheBerlios,项目名称:badger-svn,代码行数:34,代码来源:NavigationFromDB.class.php

示例2: handleBadgerException

/**
 * function called upon by global exception handler
 * 
 * @param object $e  exception  thrown
 * @return void
 */
function handleBadgerException($e)
{
    /**
     * Object containing global logging information
     * 
     * @var object
     */
    global $logger;
    echo "<b>";
    echo getBadgerTranslation2('badgerException', 'Error');
    echo "</b><br />";
    echo getBadgerTranslation2($e->getBadgerErrorPage(), $e->getBadgerErrorId());
    /**
     * Compiled error message
     * 
     * @var string 
     */
    $loggedError = "ERROR: - ERROR Module: " . $e->getBadgerErrorPage() . ", ERROR Code: " . $e->getBadgerErrorId() . ", Error Description: " . getBadgerTranslation2($e->getBadgerErrorPage(), $e->getBadgerErrorId(), 'en') . " ON LINE " . $e->getLine() . " IN FILE " . $e->getFile() . " ADDITIONAL INFO " . $e->getAdditionalInfo();
    // compile error message to be logged
    $logger->log($loggedError);
    //write to log file
}
开发者ID:BackupTheBerlios,项目名称:badger-svn,代码行数:28,代码来源:handleBadgerException.php

示例3: array

$dataGrid->initialSort = "valutaDate";
$dataGrid->initialSortDirection = "asc";
$dataGrid->height = "350px";
$dataGrid->headerSize = array(120, 210, 39, 80, 120, 200);
$dataGrid->cellAlign = array("left", "left", "center", "right", "right", "left");
$dataGrid->deleteRefreshType = "refreshDataGrid";
$dataGrid->deleteAction = "Transaction.php?action=delete&accountID={$accountID}&ID=";
$dataGrid->editAction = "Transaction.php?action=edit&accountID={$accountID}&ID=";
$dataGrid->newAction = "Transaction.php?action=new&accountID={$accountID}";
$dataGrid->initDataGridJS();
$widgets->addNavigationHead();
echo $tpl->getHeader($pageTitle);
echo "<h1>{$pageTitle}</h1>";
echo $widgets->createButton("btnNewFinished", getBadgerTranslation2('accountTransaction', 'newFinishedTrans'), "dgNew('type=finished')", "Account/finished_transaction_new.gif");
echo ' ';
echo $widgets->createButton("btnNewPlanned", getBadgerTranslation2('accountTransaction', 'newPlannedTrans'), "dgNew('type=planned')", "Account/planned_transaction_new.gif");
echo ' ';
echo $widgets->createButton("btnEdit", getBadgerTranslation2('dataGrid', 'edit'), "dgEdit()", "Widgets/table_edit.gif");
echo ' ';
echo $widgets->createButton("btnDelete", getBadgerTranslation2('dataGrid', 'delete'), "dgDelete()", "Widgets/table_delete.gif");
echo ' ';
echo $widgets->createButton("btnShowPlannedTransactions", getBadgerTranslation2('accountOverview', 'showPlannedTrans'), "location.href = location.href.replace(/AccountOverview\\.php/, 'AccountOverviewPlanned.php');", "Account/planned_transaction.png");
echo $dataGrid->writeDataGrid();
$legend = getBadgerTranslation2('dataGrid', 'legend');
$finishedTransactionText = getBadgerTranslation2('Account', 'finishedTransaction');
$finishedTransactionImage = $widgets->addImage('Account/finished_transaction.png', 'title="' . $finishedTransactionText . '"');
$plannedTransactionText = getBadgerTranslation2('Account', 'plannedTransaction');
$plannedTransactionImage = $widgets->addImage('Account/planned_transaction.png', 'title="' . $plannedTransactionText . '"');
eval('echo "' . $tpl->getTemplate('Account/AccountOverview') . '";');
eval("echo \"" . $tpl->getTemplate("badgerFooter") . "\";");
require_once BADGER_ROOT . "/includes/fileFooter.php";
开发者ID:BackupTheBerlios,项目名称:badger-svn,代码行数:31,代码来源:AccountOverview.php

示例4: foreach

$total->add($other);
foreach ($amounts as $currentAmount) {
    $total->add($currentAmount);
}
foreach ($amounts as $currentId => $currentAmount) {
    $percentage = new Amount($currentAmount);
    $percentage->div($total);
    if ($percentage->compare(MIN_PERCENTAGE) < 0) {
        $other->add($currentAmount);
        unset($amounts[$currentId]);
        unset($labels[$currentId]);
    }
}
if ($other->compare(0) != 0) {
    $amounts['other'] = $other;
    $labels['other'] = getBadgerTranslation2('statistics2', 'miscCategories');
}
$data = array();
$dataNames = array();
foreach ($amounts as $currentAmount) {
    $data[] = $currentAmount->mul($type == 'i' ? 1 : -1)->get();
    $dataNames[] = $currentAmount->getFormatted();
}
$legends = array();
foreach ($labels as $currentKey => $currentLabel) {
    $legends[] = $currentLabel . ' - ' . $amounts[$currentKey]->getFormatted();
}
$targets = array();
foreach ($labels as $currentId => $currentLabel) {
    if ($currentId != 'none' && $currentId != 'other') {
        $targets[] = 'javascript:reachThroughCategory(\'' . substr($currentId, 1) . '\');';
开发者ID:BackupTheBerlios,项目名称:badger-svn,代码行数:31,代码来源:category.php

示例5: getBadgerTranslation2

                }
            }
        }
    }
    $submitTitle = getBadgerTranslation2('importCsv', 'submitTitle');
    echo "<h1>{$submitTitle}</h1>\n";
    if ($selectedTransactionNumber > 0) {
        // echo success message & number of written transactions
        echo $selectedTransactionNumber . ' ' . getBadgerTranslation2("importCsv", "successfullyWritten") . '<ul>';
        foreach ($targetAccounts as $currentAccount) {
            echo '<li><a href="' . BADGER_ROOT . '/modules/account/AccountOverview.php?accountID=' . $currentAccount->getId() . '">' . htmlentities($currentAccount->getTitle()) . '</a></li>';
        }
        echo '</ul>';
    } else {
        //echo no transactions selected
        echo getBadgerTranslation2("importCsv", "noTransactionSelected");
    }
}
eval("echo \"" . $tpl->getTemplate("badgerFooter") . "\";");
require_once BADGER_ROOT . "/includes/fileFooter.php";
function importMatching($importedTransaction, $accountId)
{
    global $us;
    global $badgerDb;
    static $dateDelta = null;
    static $amountDelta = null;
    static $textSimilarity = null;
    static $categories = null;
    if (is_null($dateDelta)) {
        try {
            $dateDelta = $us->getProperty('matchingDateDelta');
开发者ID:BackupTheBerlios,项目名称:badger-svn,代码行数:31,代码来源:csvImport.php

示例6: getBadgerTranslation2

$autoExpandPlannedTransactionsField = $widgets->createField('autoExpandPlannedTransactionsField', 0, 1, getBadgerTranslation2('UserSettingsAdmin', 'autoExpandPlannedTransactionsDescription'), true, 'checkbox', $us->getProperty('autoExpandPlannedTransactions') ? 'checked="checked"' : '');
// Print Form for change of password
$PWFormLabel = getBadgerTranslation2('UserSettingsAdmin', 'change_password_heading');
$OldPwLabel = $widgets->createLabel("OldPassword", getBadgerTranslation2('UserSettingsAdmin', 'old_password_name'), false);
$OldPwField = $widgets->createField("OldPassword", 20, "", getBadgerTranslation2('UserSettingsAdmin', 'old_password_description'), false, 'password');
$NewPwLabel = $widgets->createLabel("NewPassword", getBadgerTranslation2('UserSettingsAdmin', 'new_password_name'), false);
$NewPwField = $widgets->createField("NewPassword", 20, "", getBadgerTranslation2('UserSettingsAdmin', 'new_password_description'), false, 'password');
$ConfPwLabel = $widgets->createLabel("NewPasswordConfirm", getBadgerTranslation2('UserSettingsAdmin', 'new_password_confirm_name'), false);
$ConfPwField = $widgets->createField("NewPasswordConfirm", 20, "", getBadgerTranslation2('UserSettingsAdmin', 'new_password_confirm_description'), false, 'password');
$btnSubmit = $widgets->createButton("SubmitUserSettings", getBadgerTranslation2('UserSettingsAdmin', 'submit_button'), "submit", "Widgets/accept.gif", "accesskey='s'");
// Begin of Feedback
$Feedback = "<br/>";
if (isset($validation_user_settings) && $validation_user_settings == true && $change_password == true && isset($validation_change_password) && $validation_change_password == true || isset($validation_user_settings) && $validation_user_settings == true && $change_password == false) {
    if ($change_password == true) {
        $Feedback .= getBadgerTranslation2('UserSettingsAdmin', 'password_change_commited') . "<br/>";
    }
    $Feedback .= getBadgerTranslation2('UserSettingsAdmin', 'user_settings_change_commited') . "<br/><br/>";
}
if ($change_password == true && isset($validation_change_password) && $validation_change_password != true) {
    $Feedback .= $validation_change_password_errors;
}
// If Validation for User Settings had returned
// a bad result, print the error messages
if (isset($validation_user_settings) && $validation_user_settings != true) {
    $Feedback .= "<div class=\"USAError\">" . $validation_user_settings_errors . "</div><br/><br/>";
}
// End of Feedback
eval("echo \"" . $tpl->getTemplate("UserSettingsAdmin/UserSettingsAdmin") . "\";");
//--
//--
eval("echo \"" . $tpl->getTemplate("badgerFooter") . "\";");
开发者ID:BackupTheBerlios,项目名称:badger-svn,代码行数:31,代码来源:UserSettingsAdmin.php

示例7: addJSValMessages

 function addJSValMessages()
 {
     $this->tpl->addHeaderTag("<script type=\"text/javascript\">");
     $this->tpl->addHeaderTag("function _jsVal_Language() {");
     $this->tpl->addHeaderTag("\tthis.err_form = '" . getBadgerTranslation2('jsVal', 'err_form') . "';");
     $this->tpl->addHeaderTag("\tthis.err_select = '" . getBadgerTranslation2('jsVal', 'err_select') . "';");
     $this->tpl->addHeaderTag("\tthis.err_enter = '" . getBadgerTranslation2('jsVal', 'err_enter') . "';");
     $this->tpl->addHeaderTag("}");
     $this->tpl->addHeaderTag("</script>");
 }
开发者ID:BackupTheBerlios,项目名称:badger-svn,代码行数:10,代码来源:WidgetsEngine.class.php

示例8: getAll

 /**
  * Returns all fields in an array.
  * 
  * The result has the following form:
  * array (
  *   array (
  *     'field name 0' => 'value of field 0',
  *     'field name 1' => 'value of field 1'
  *   )
  * );
  * 
  * The inner array is repeated for each row.
  * The fields need to be in the order returned by @link getFieldNames().
  * 
  * @return array A list of all fields.
  */
 public function getAll()
 {
     global $us;
     while ($this->fetchNextCategory()) {
     }
     $this->sortCategories();
     $result = array();
     $currResultIndex = 0;
     $currentLanguage = $us->getProperty('badgerLanguage');
     foreach ($this->categories as $currentCategory) {
         $parent = $currentCategory->getParent();
         if (is_null($parent)) {
             $title = '';
             $parentId = '';
             $parentTitle = $currentCategory->getTitle();
         } else {
             $title = $currentCategory->getTitle();
             $parentId = $parent->getId();
             $parentTitle = $parent->getTitle();
         }
         if ($currentCategory->getOutsideCapital()) {
             $image = "Account/{$currentLanguage}/outside_capital.png";
             $tooltip = getBadgerTranslation2('CategoryManager', 'outsideCapital');
         } else {
             $image = "Account/{$currentLanguage}/own_capital.png";
             $tooltip = getBadgerTranslation2('CategoryManager', 'ownCapital');
         }
         $result[$currResultIndex] = array();
         $result[$currResultIndex]['categoryId'] = $currentCategory->getId();
         foreach ($this->selectedFields as $selectedField) {
             switch ($selectedField) {
                 case 'title':
                     $result[$currResultIndex]['title'] = $title;
                     break;
                 case 'description':
                     $result[$currResultIndex]['description'] = $currentCategory->getDescription();
                     break;
                 case 'outsideCapital':
                     $result[$currResultIndex]['outsideCapital'] = array('img' => getRelativeTplPath($image), 'title' => $tooltip);
                     break;
                 case 'parentId':
                     $result[$currResultIndex]['parentId'] = $parentId;
                     break;
                 case 'parentTitle':
                     $result[$currResultIndex]['parentTitle'] = $parentTitle;
                     break;
                 case 'keywords':
                     $result[$currResultIndex]['keywords'] = $currentCategory->getKeywords();
                     break;
                 case 'expense':
                     $result[$currResultIndex]['expense'] = $currentCategory->getExpense();
                     break;
             }
             //switch
         }
         //foreach selectedFields
         $currResultIndex++;
     }
     //foreach categories
     return $result;
 }
开发者ID:BackupTheBerlios,项目名称:badger-svn,代码行数:77,代码来源:CategoryManager.class.php

示例9: getBadgerTranslation2

$account = $am->getAccountById($accountID);
$pageTitle = getBadgerTranslation2('accountOverviewPlanned', 'pageTitle');
$pageTitle .= ": " . $account->getTitle();
$widgets = new WidgetEngine($tpl);
$dataGrid = new DataGrid($tpl, "Account" . $accountID . "planned");
$dataGrid->sourceXML = BADGER_ROOT . "/core/XML/getDataGridXML.php?q=Account&qp={$accountID};planned";
$dataGrid->headerName = array(getBadgerTranslation2('accountOverview', 'colTitle'), getBadgerTranslation2('accountOverviewPlanned', 'colBeginDate'), getBadgerTranslation2('accountOverviewPlanned', 'colEndDate'), getBadgerTranslation2('accountOverviewPlanned', 'colRepeatText'), getBadgerTranslation2('accountOverview', 'colAmount'), getBadgerTranslation2('accountOverview', 'colCategoryTitle'));
//$dataGrid->columnOrder = array("title","beginDate", "endDate", "repeatUnit", "repeatFrequency", "amount", "categoryTitle");
$dataGrid->columnOrder = array("title", "beginDate", "endDate", "repeatText", "amount", "categoryTitle");
$dataGrid->height = "350px";
//$dataGrid->headerSize = array(210, 95, 85, 70, 75, 120, 200);
$dataGrid->headerSize = array(210, 95, 85, 85, 120, 200);
//$dataGrid->cellAlign = array("left", "right", "right", "left", "right", "right", "left");
$dataGrid->cellAlign = array("left", "right", "right", "left", "right", "left");
$dataGrid->deleteAction = "Transaction.php?action=delete&backTo=planned&accountID={$accountID}&ID=";
$dataGrid->editAction = "Transaction.php?action=edit&backTo=planned&accountID={$accountID}&ID=";
$dataGrid->newAction = "Transaction.php?action=new&backTo=planned&accountID={$accountID}";
$dataGrid->initDataGridJS();
$widgets->addNavigationHead();
echo $tpl->getHeader($pageTitle);
echo "<h1>{$pageTitle}</h1>";
echo $widgets->createButton("btnNewPlanned", getBadgerTranslation2('accountTransaction', 'newPlannedTrans'), "dataGridAccount" . $accountID . "planned.callNewEvent('type=planned')", "Widgets/table_add.gif");
echo ' ';
echo $widgets->createButton("btnEdit", getBadgerTranslation2('dataGrid', 'edit'), "dataGridAccount" . $accountID . "planned.callEditEvent()", "Widgets/table_edit.gif");
echo ' ';
echo $widgets->createButton("btnDelete", getBadgerTranslation2('dataGrid', 'delete'), "dataGridAccount" . $accountID . "planned.callDeleteEvent()", "Widgets/table_delete.gif");
echo ' ';
echo $widgets->createButton("btnShowTransactions", getBadgerTranslation2('accountOverviewPlanned', 'showTrans'), "location.href = location.href.replace(/AccountOverviewPlanned\\.php/, 'AccountOverview.php');", "Account/finished_transaction.png");
echo $dataGrid->writeDataGrid();
eval("echo \"" . $tpl->getTemplate("badgerFooter") . "\";");
require_once BADGER_ROOT . "/includes/fileFooter.php";
开发者ID:BackupTheBerlios,项目名称:badger-svn,代码行数:31,代码来源:AccountOverviewPlanned.php

示例10: getUpdateTranslation

function getUpdateTranslation($pageId, $id)
{
    global $us;
    static $transTbl = array('updateProcedure' => array('en' => array('pageTitle' => 'Update BADGER finance', 'legend' => 'Steps to Update', 'updateInformation' => 'BADGER finance detected an update of its files. This page updates the database. All your data will be preserved.', 'dbVersionText' => 'Database version:', 'fileVersionText' => 'File version:', 'stepDescription' => 'The update consists of two simple steps. First, a backup of the database is saved to your computer. This preserves your data in the rare case anything goes wrong. Second, the database is updated.', 'step1PreLink' => 'Please click the following link and save the file to your computer.', 'step1LinkText' => 'Save backup', 'step1PostLink' => '', 'step2PreLink' => 'Please click the following link to start the database update.', 'step2LinkText' => 'Update database', 'step2PostLink' => ''), 'de' => array('pageTitle' => 'BADGER finance aktualisieren', 'legend' => 'Schritte zur Aktualisierung', 'updateInformation' => 'BADGER finance hat eine Aktualisierung seiner Dateien festgestellt. Diese Seite aktualisiert die Datenbank. Ihre Daten bleiben vollständig erhalten.', 'dbVersionText' => 'Datenbank-Version:', 'fileVersionText' => 'Datei-Version:', 'stepDescription' => 'Die Aktualisierung besteht aus zwei einfachen Schritten. Zuerst wird eine Sicherheitskopie der Datenbank auf Ihrem Computer gespeichert. Dadurch bleiben Ihre Daten auch im unwahrscheinlichen Fall eines Fehlschlags erhalten. Anschließend wird die Datenbank aktualisiert.', 'step1PreLink' => 'Bitte klicken Sie auf folgenden Link und speichern Sie die Datei auf Ihrem Computer.', 'step1LinkText' => 'Sicherungskopie speichern', 'step1PostLink' => '', 'step2PreLink' => 'Bitte klicken Sie auf folgenden Link, um die Datenbank-Aktualisierung zu beginnen.', 'step2LinkText' => 'Datenbank aktualisieren', 'step2PostLink' => '')), 'updateUpdate' => array('en' => array('pageTitle' => 'Updating BADGER finance', 'betweenVersionsText' => 'Versions in between:', 'preCurrentText' => 'Update from', 'postCurrentText' => 'to', 'postNextText' => '', 'logEntryHeader' => 'Information from the update:', 'updateInformation' => 'BADGER finance is now performing the update. It is performed step-by-step, one step for each version.', 'errorInformation' => 'Please read the output of the process. If it encounters any severe errors they are written in red. In this case, please send the whole output to the BADGER development team (see help for contact info).', 'updateFinished' => 'The update has finished.', 'severeError' => 'The update encountered a severe error. Please send the whole output to the BADGER finance development team.', 'goToStartPagePreLink' => 'Please ', 'goToStartPageLinkText' => 'go to start page', 'goToStartPagePostLink' => ' to continue.'), 'de' => array('pageTitle' => 'BADGER finance wird aktualisiert', 'betweenVersionsText' => 'Dazwischenliegende Versionen:', 'preCurrentText' => 'Aktualisierung von', 'postCurrentText' => 'auf', 'postNextText' => '', 'logEntryHeader' => 'Informationen der Aktualisierung:', 'updateInformation' => 'Die Aktualisierung wird nun durchgeführt. Dies findet Schritt für Schritt statt, einen Schritt für jede Version.', 'errorInformation' => 'Bitte lesen sie die Ausgabe dieses Prozesses. Die einfachen Informationen sind auf Englisch gehalten. Falls der Prozess irgend welche schweren Fehler meldet, sind diese rot eingefärbt. Bitte schicken Sie in diesem Fall die gesamte Ausgabe an das BADGER Entwicklungsteam (siehe Hilfe für Kontaktinformationen).', 'updateFinished' => 'Die Aktualisierung ist beendet.', 'severeError' => 'Die Aktualisierung stieß auf einen schweren Fehler. Bitte schicken Sie die gesamte Ausgabe an das BADGER finance development team.', 'goToStartPagePreLink' => 'Bitte ', 'goToStartPageLinkText' => 'zur Startseite gehen', 'goToStartPagePostLink' => ' um fortzusetzen.')));
    $trans = getBadgerTranslation2($pageId, $id);
    if (PEAR::isError($trans) || $trans === '') {
        $trans = $transTbl[$pageId][$us->getProperty('badgerLanguage')][$id];
    }
    return $trans;
}
开发者ID:BackupTheBerlios,项目名称:badger-svn,代码行数:10,代码来源:update.php

示例11: DataGrid

$dataGrid = new DataGrid($tpl, "CategoryManager");
$dataGrid->sourceXML = BADGER_ROOT . "/core/XML/getDataGridXML.php?q=CategoryManager";
$dataGrid->headerName = array(getBadgerTranslation2('accountCategory', 'colparentTitle'), getBadgerTranslation2('accountCategory', 'colTitle'), getBadgerTranslation2('accountCategory', 'colDescription'), getBadgerTranslation2('accountCategory', 'colOutsideCapital'));
$dataGrid->columnOrder = array("parentTitle", "title", "description", "outsideCapital");
$dataGrid->deleteMsg = getBadgerTranslation2('accountCategory', 'deleteMsg');
$dataGrid->headerSize = array(200, 200, 300, 100);
$dataGrid->cellAlign = array("left", "left", "left", "center");
$dataGrid->height = "350px";
$dataGrid->deleteAction = "CategoryManager.php?action=delete&ID=";
$dataGrid->editAction = "CategoryManager.php?action=edit&ID=";
$dataGrid->newAction = "CategoryManager.php?action=new";
$dataGrid->deleteRefreshType = 'refreshDataGrid';
$dataGrid->initDataGridJS();
$widgets->addNavigationHead();
echo $tpl->getHeader($pageTitle);
echo "<h1>{$pageTitle}</h1>";
echo $widgets->createButton("btnNew", getBadgerTranslation2('dataGrid', 'new'), "dataGridCategoryManager.callNewEvent()", "Widgets/table_add.gif");
echo ' ';
echo $widgets->createButton("btnEdit", getBadgerTranslation2('dataGrid', 'edit'), "dataGridCategoryManager.callEditEvent()", "Widgets/table_edit.gif");
echo ' ';
echo $widgets->createButton("btnDelete", getBadgerTranslation2('dataGrid', 'delete'), "dataGridCategoryManager.callDeleteEvent()", "Widgets/table_delete.gif");
echo $dataGrid->writeDataGrid();
$legend = getBadgerTranslation2('dataGrid', 'legend');
$currentLanguage = $us->getProperty('badgerLanguage');
$ownCapitalText = getBadgerTranslation2('CategoryManager', 'ownCapital');
$ownCapitalImage = $widgets->addImage("Account/{$currentLanguage}/own_capital.png", 'title="' . $ownCapitalText . '"');
$outsideCapitalText = getBadgerTranslation2('CategoryManager', 'outsideCapital');
$outsideCapitalImage = $widgets->addImage("Account/{$currentLanguage}/outside_capital.png", 'title="' . $outsideCapitalText . '"');
eval('echo "' . $tpl->getTemplate('Account/CategoryManagerOverview') . '";');
eval("echo \"" . $tpl->getTemplate("badgerFooter") . "\";");
require_once BADGER_ROOT . "/includes/fileFooter.php";
开发者ID:BackupTheBerlios,项目名称:badger-svn,代码行数:31,代码来源:CategoryManagerOverview.php

示例12: printFrontend

function printFrontend()
{
    global $tpl;
    global $cm;
    global $order;
    global $redirectPageAfterSave;
    if (isset($_GET['ID'])) {
        //edit: load values for this ID
        $ID = getGPC($_GET, 'ID', 'integer');
        $pageTitle = getBadgerTranslation2('accountCategory', 'pageTitleEdit');
        $category = $cm->getCategoryById($ID);
        $titleValue = $category->getTitle();
        $descriptionValue = $category->getDescription();
        if ($category->getOutsideCapital() == "1") {
            $outsideCapitalValue = "checked";
        } else {
            $outsideCapitalValue = "";
        }
        $keywordsValue = $category->getKeywords();
        if ($category->getParent()) {
            $parentValue = $category->getParent()->getTitle();
            $parentId = $category->getParent()->getId();
        } else {
            $parentValue = "";
            $parentId = "";
        }
        $expenseValue = $category->getExpense();
    } else {
        //new: empty values
        $pageTitle = getBadgerTranslation2('accountCategory', 'pageTitleNew');
        $ID = "new";
        $titleValue = "";
        $descriptionValue = "";
        $outsideCapitalValue = "";
        $keywordsValue = "";
        $parentValue = "";
        $parentId = "";
        $expenseValue = null;
    }
    $widgets = new WidgetEngine($tpl);
    $widgets->addToolTipJS();
    $widgets->addJSValMessages();
    $tpl->addJavaScript("js/prototype.js");
    $tpl->addOnLoadEvent("Form.focusFirstElement('mainform')");
    $widgets->addNavigationHead();
    echo $tpl->getHeader($pageTitle);
    echo $widgets->addToolTipLayer();
    //set vars with values
    $FormAction = $_SERVER['PHP_SELF'];
    $legend = getBadgerTranslation2('accountCategory', 'legend');
    $hiddenID = $widgets->createField("hiddenID", 20, $ID, "", false, "hidden");
    $pageHeading = $pageTitle;
    //Fields & Labels
    $titleLabel = $widgets->createLabel("title", getBadgerTranslation2('accountCategory', 'title'), true);
    $titleField = $widgets->createField("title", 30, $titleValue, "", true, "text", "style='width: 30ex;'");
    $descriptionLabel = $widgets->createLabel("description", getBadgerTranslation2('accountCategory', 'description'), false);
    $descriptionField = $widgets->createTextarea("description", $descriptionValue, "", false, "style='width: 30ex; height: 5em;'");
    $parentLabel = $widgets->createLabel("parent", getBadgerTranslation2('accountCategory', 'parent'), false);
    $parentCats = array("" => getBadgerTranslation2('CategoryManager', 'no_parent'));
    while ($cat = $cm->getNextCategory()) {
        $cat->getParent();
    }
    $cm->resetCategories();
    while ($cat = $cm->getNextCategory()) {
        if (is_null($cat->getParent())) {
            $parentCats[$cat->getId()] = $cat->getTitle();
        }
    }
    $parentField = $widgets->createSelectField("parent", $parentCats, $parentId, '', false, "style='width: 31ex;'");
    $outsideCapitalLabel = $widgets->createLabel("outsideCapital", getBadgerTranslation2('accountCategory', 'outsideCapital'), false);
    $outsideCapitalField = $widgets->createField("outsideCapital", 30, "on", "", false, "checkbox", $outsideCapitalValue);
    $keywordsLabel = $widgets->createLabel('keywords', getBadgerTranslation2('accountCategory', 'keywordsLabel'), false);
    $keywordsField = $widgets->createTextarea('keywords', $keywordsValue, getBadgerTranslation2('accountCategory', 'keywordsDescription'), false, "style='width: 30ex; height: 5em;'");
    $expenseRowLabel = getBadgerTranslation2('accountCategory', 'expenseRowLabel');
    $incomeField = $widgets->createField('expense', 0, 'income', '', false, 'radio', $expenseValue === false ? 'checked="checked"' : '');
    $incomeLabel = $widgets->createLabel('expense', getBadgerTranslation2('accountCategory', 'expenseIncome'), false);
    $expenseField = $widgets->createField('expense', 0, 'expense', '', false, 'radio', $expenseValue === true ? 'checked="checked"' : '');
    $expenseLabel = $widgets->createLabel('expense', getBadgerTranslation2('accountCategory', 'expenseExpense'), false);
    //Buttons
    $submitBtn = $widgets->createButton("submitBtn", getBadgerTranslation2('dataGrid', 'save'), "submit", "Widgets/accept.gif", "accesskey='s'");
    $backBtn = $widgets->createButton("backBtn", getBadgerTranslation2('dataGrid', 'back'), "location.href='{$redirectPageAfterSave}';return false;", "Widgets/back.gif");
    //add vars to template, print site
    eval("echo \"" . $tpl->getTemplate("Account/Category") . "\";");
}
开发者ID:BackupTheBerlios,项目名称:badger-svn,代码行数:84,代码来源:CategoryManager.php

示例13: urlencode

                $pocketMoney2EndValue = $val3->sub($PocketMoney2Loop->mul($day))->get();
            }
            $day++;
        }
        //foreach($totals as $key => $val) {
        echo '<forecastData>';
        $insertChart = urlencode($insertChart);
        echo "<insertChart>{$insertChart}</insertChart>";
        if ($showSavingTarget == 1) {
            $dailyPocketMoneyValue = $dailyPocketMoney->getFormatted();
            echo "<dailyPocketMoneyValue>{$dailyPocketMoneyValue}</dailyPocketMoneyValue>";
        }
        if ($pocketMoney1EndValue) {
            $printedPocketMoney1EndValue = new Amount($pocketMoney1EndValue);
            $balancedEndDate1 = $printedPocketMoney1EndValue->getFormatted();
            echo "<balancedEndDate1>{$balancedEndDate1}</balancedEndDate1>";
        }
        if ($pocketMoney2EndValue) {
            $printedPocketMoney2EndValue = new Amount($pocketMoney2EndValue);
            $balancedEndDate2 = $printedPocketMoney2EndValue->getFormatted();
            echo "<balancedEndDate2>{$balancedEndDate2}</balancedEndDate2>";
        }
        echo "<accountCurrency>{$accountCurrency}</accountCurrency>";
        echo '</forecastData>';
    }
} else {
    //if ($today->compare($today, $selectedDate)!=1){
    $noFutureDates = getBadgerTranslation2("forecast", "onlyFutureDates");
    echo "<errors><error>{$noFutureDates}</error></errors>";
}
require_once BADGER_ROOT . "/includes/fileFooter.php";
开发者ID:BackupTheBerlios,项目名称:badger-svn,代码行数:31,代码来源:calcForecast.php

示例14: getBadgerTranslation2

}
if ($showPlannedTransactions == 1) {
    $chart['chart_data'][$numberOfGraph1][0] = getBadgerTranslation2("forecast", "plannedTransactions");
    //account balance for every day between today & end date, if no other expenses / income than in the finished transactions
    $numberOfGraph1++;
}
if ($showSavingTarget == 1) {
    $chart['chart_data'][$numberOfGraph1][0] = getBadgerTranslation2("forecast", "savingTarget");
    $numberOfGraph1++;
}
if ($showPocketMoney1 == 1) {
    $chart['chart_data'][$numberOfGraph1][0] = getBadgerTranslation2("forecast", "pocketMoney1");
    $numberOfGraph1++;
}
if ($showPocketMoney2 == 1) {
    $chart['chart_data'][$numberOfGraph1][0] = getBadgerTranslation2("forecast", "pocketMoney2");
    $numberOfGraph1++;
}
$day = 0;
foreach ($totals as $key => $val) {
    $tmp = new Date($key);
    $chart['chart_data'][0][] = $tmp->getFormatted();
    $numberOfGraph = 1;
    if ($showLowerLimit == 1) {
        $chart['chart_data'][$numberOfGraph][] = $lowerLimit->get();
        $numberOfGraph++;
    }
    if ($showUpperLimit == 1) {
        $chart['chart_data'][$numberOfGraph][] = $upperLimit->get();
        $numberOfGraph++;
    }
开发者ID:BackupTheBerlios,项目名称:badger-svn,代码行数:31,代码来源:forecastChart.php

示例15: getBadgerTranslation2

$lowerLimitToolTip = $widgets->addToolTip(getBadgerTranslation2("forecast", "lowerLimitToolTip"));
//checkbox for upper limit graph
$upperLimitLabel = getBadgerTranslation2("forecast", "upperLimitLabel") . ":";
$upperLimitBox = "<input type=\"checkbox\" id=\"upperLimitBox\" name=\"upperLimitBox\" value=\"select\" checked=\"checked\"/>";
$upperLimitToolTip = $widgets->addToolTip(getBadgerTranslation2("forecast", "upperLimitToolTip"));
//checkbox for planned transactions graph
$plannedTransactionsLabel = getBadgerTranslation2("forecast", "plannedTransactionsLabel") . ":";
$plannedTransactionsBox = "<input type=\"checkbox\" id=\"plannedTransactionsBox\" name=\"plannedTransactionsBox\" value=\"select\" checked=\"checked\"/>";
$plannedTransactionsToolTip = $widgets->addToolTip(getBadgerTranslation2("forecast", "plannedTransactionsToolTip"));
//checkbox for saving target graph
$savingTargetLabel1 = getBadgerTranslation2("forecast", "savingTargetLabel") . ":";
$savingTargetBox = "<input type=\"checkbox\" id=\"savingTargetBox\" name=\"savingTargetBox\" value=\"select\" checked=\"checked\"/>";
$savingTargetToolTip = $widgets->addToolTip(getBadgerTranslation2("forecast", "showSavingTargetToolTip"));
//checkbox for pocket money1 graph
$pocketMoney1Label1 = getBadgerTranslation2("forecast", "pocketMoney1Label") . ":";
$pocketMoney1Box = "<input type=\"checkbox\" id=\"pocketMoney1Box\" name=\"pocketMoney1Box\" value=\"select\" checked=\"checked\"/>";
$pocketMoney1ToolTip = $widgets->addToolTip(getBadgerTranslation2("forecast", "showPocketMoney1ToolTip"));
//checkbox for pocket money1 graph
$pocketMoney2Label1 = getBadgerTranslation2("forecast", "pocketMoney2Label") . ":";
$pocketMoney2Box = "<input type=\"checkbox\" id=\"pocketMoney2Box\" name=\"pocketMoney2Box\" value=\"select\" checked=\"checked\"/>";
$pocketMoneyTool2Tip = $widgets->addToolTip(getBadgerTranslation2("forecast", "showPocketMoney2ToolTip"));
//Create Chart Button
$tooLongTimeSpanWarning = getBadgerTranslation2("forecast", "performanceWarning");
$sendButton = $widgets->createButton("sendData", getBadgerTranslation2("forecast", "sendData"), 'submitForecast();', "Widgets/accept.gif");
$dailyPocketMoneyLabel = getBadgerTranslation2("forecast", "dailyPocketMoneyLabel") . ":";
$dailyPocketMoneyToolTip = $widgets->addToolTip(getBadgerTranslation2("forecast", "dailyPocketMoneyToolTip")) . "<br />";
$balancedEndDateLabel1 = getBadgerTranslation2("forecast", "printedPocketMoney1Label") . ": ";
$balancedEndDateLabel2 = getBadgerTranslation2("forecast", "printedPocketMoney2Label") . ": ";
eval("echo \"" . $tpl->getTemplate("forecast/forecast") . "\";");
//show chart
eval("echo \"" . $tpl->getTemplate("badgerFooter") . "\";");
开发者ID:BackupTheBerlios,项目名称:badger-svn,代码行数:31,代码来源:forecast.php


注:本文中的getBadgerTranslation2函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。