コード例 #1
0
ファイル: overview.php プロジェクト: Rem122/Uthando-CMS
        $c = 0;
        $data = array();
        $tab_array = array();
        $orderRow = $this->getResult('order_status_id, order_status', $this->registry->core . 'ushop_order_status');
        foreach ($orders as $row) {
            $data[$c][] = $row->name;
            $data[$c][] = $row->invoice;
            $form = '<form id="order' . $row->order_id . '" action="' . $_SERVER['REQUEST_URI'] . '" method="post">';
            $form .= '<select name="order_status" onChange="this.form.submit()">';
            foreach ($orderRow as $or) {
                $form .= '<option value="' . $or->order_status_id . '" ';
                if ($row->order_status == $or->order_status) {
                    $form .= 'selected="selected"';
                }
                $form .= '>' . $or->order_status . '</option>';
            }
            $form .= '</select>';
            $form .= '<input type="hidden" name="oid" value="' . $row->order_id . '" />';
            $form .= '</form>';
            $data[$c][] = $form;
            $data[$c][] = $row->date;
            $c++;
        }
        $header = array('Customer', 'Invoice', 'Status', 'Date');
        $table = $this->dataTable($data, $header);
        $orders = $table->toHtml();
        $tab_array['New Orders'] = $orders;
        $tabs = new HTML_Tabs($tab_array);
        $this->addContent($tabs->toHtml());
    }
}
コード例 #2
0
ファイル: edit_product.php プロジェクト: Rem122/Uthando-CMS
     } else {
         $form->setDefaults(array('enabled' => $row->enabled, 'discontinued' => $row->discontinued, 'name' => HTML_Element::makeXmlSafe($row->name), 'sku' => $row->sku, 'category_id' => $row->category_id, 'short_description' => $row->short_description, 'description' => $row->description, 'price' => $row->price, 'price_group_id' => $row->price_group_id, 'postage' => $row->postage, 'weight' => $row->weight, 'author_id' => $row->author_id, 'isbn' => $row->isbn, 'image_status' => $row->image_status, 'quantity' => $row->quantity, 'image' => $row->image));
         $tab_array = array('details' => null, 'description' => null, 'price' => null, 'attributes' => null, 'image_upload' => null);
         foreach ($errors as $value) {
             $err = $form->getElementError($value);
             if ($err) {
                 $this->registry->Warning($err);
             }
         }
         $renderer = new UthandoForm(__SITE_PATH . '/templates/' . $this->get('admin_config.site.template'));
         $renderer->setFormTemplate('form');
         $renderer->setHeaderTemplate('header');
         $renderer->setElementTemplate('element');
         $form->accept($renderer);
         // output the form
         $tabs = new HTML_Tabs($tab_array, true);
         $tabs->addPanels($renderer->toHtml());
         $this->content .= $tabs->toHtml();
         //$this->content .= $renderer->toHtml();
         $session = Utility::encodeString(session_id());
         $this->addScriptDeclaration("UthandoAdmin.sid = ['" . $session[0] . "','" . $session[1] . "'];");
         $this->loadJavaScript(array('/Common/editor/tiny_mce/tiny_mce_gzip.js', '/Common/js/tinyMCEGz.js'));
         $this->registry->component_js = array('/components/ushop/js/products.js');
         $this->registry->component_css = array('/templates/' . $this->get('admin_config.site.template') . '/css/FileManager.css', '/templates/' . $this->get('admin_config.site.template') . '/css/Additions.css');
     }
 } else {
     $params['TYPE'] = 'info';
     if (!$tax_codes) {
         $params['MESSAGE'] = '<h2>First define some tax codes.</h2>';
     } elseif (!$categories) {
         $params['MESSAGE'] = '<h2>First define some categories.</h2>';
コード例 #3
0
ファイル: overview.php プロジェクト: shaunfreeman/Uthando-CMS
<?php

// no direct access
defined('PARENT_FILE') or die('Restricted access');
if ($this->authorize()) {
    $taxBar = array('back' => '/ushop/overview', 'new_tax_codes' => '/ushop/tax/action-new_tax_code', 'new_tax_rates' => '/ushop/tax/action-new_tax_rate');
    $this->content .= $this->makeToolbar(array_merge($taxBar, $menuBar), 24);
    $tax_rates = $ushop->getTaxRates(true);
    require_once 'ushop/tax/tax_codes.php';
    require_once 'ushop/tax/tax_rates.php';
    $tab_array = array('tax_codes' => $display_codes, 'tax_rates' => $display_rates);
    $tabs = new HTML_Tabs($tab_array);
    $this->content .= $tabs->toHtml();
} else {
    header("Location:" . $this->get('config.server.web_url'));
    exit;
}
コード例 #4
0
ファイル: mootools.php プロジェクト: shaunfreeman/Uthando-CMS
                        }
                    }
                }
                $panels .= '<tr class="option file">
						<td class="check">
						<div class="check" id="' . $key . '" deps="' . substr($deps, 0, -1) . '">
						<input type="checkbox" name="files[]" value="' . $folder . '/' . $key . '.js" ' . $checked . ' />
						</div>
						</td>
						<td class="name">' . $key . '</td>
						<td class="description">
						<p>' . $value['desc'] . '</p>
						</td>
						</tr>';
            }
        }
        $panels .= '</table>';
        $panels .= '</div>';
    }
    //$json .= '</div>';
    $tabs = new HTML_Tabs($tab_array, true);
    $tabs->addPanels($panels);
    $json .= $tabs->toHtml();
    $json .= '</form>';
    $json .= '</div>';
    $this->content .= $json;
    $this->registry->component_js = array('/components/template/js/mootools.js');
} else {
    header("Location:" . $registry->config->get('web_url', 'SERVER'));
    exit;
}