Optimised Company() Setup() Config() and changed method_directory into URL
This commit is contained in:
@@ -27,7 +27,7 @@ class Controller_Admin_Charge extends Controller_TemplateDefault_Admin {
|
||||
ORM::factory('Charge')->where('sweep_type','>=',0)->order_by('date_orig DESC')->find_all(),
|
||||
25,
|
||||
array(
|
||||
'id'=>array('label'=>'ID','url'=>'user/charge/view/'),
|
||||
'id'=>array('label'=>'ID','url'=>URL::site('user','charge/view/')),
|
||||
'date_orig'=>array('label'=>'Date'),
|
||||
'sweep_type'=>array('label'=>'Sweep'),
|
||||
'status'=>array('label'=>'Status'),
|
||||
@@ -42,7 +42,7 @@ class Controller_Admin_Charge extends Controller_TemplateDefault_Admin {
|
||||
array(
|
||||
'page'=>TRUE,
|
||||
'type'=>'select',
|
||||
'form'=>'user/charge/view',
|
||||
'form'=>URL::site('user','charge/view'),
|
||||
)),
|
||||
));
|
||||
}
|
||||
@@ -91,7 +91,7 @@ class Controller_Admin_Charge extends Controller_TemplateDefault_Admin {
|
||||
Script::add(array('type'=>'stdin','data'=>'
|
||||
$(document).ready(function() {
|
||||
$("input[name=account_id]").autocomplete({
|
||||
source: "'.URL::site('admin/account/ajaxlist').'",
|
||||
source: "'.URL::site('a/account/ajaxlist').'",
|
||||
minLength: 2,
|
||||
change: function(event,ui) {
|
||||
// Send the request and update sub category dropdown
|
||||
@@ -100,7 +100,7 @@ class Controller_Admin_Charge extends Controller_TemplateDefault_Admin {
|
||||
data: "aid="+$(this).val(),
|
||||
dataType: "json",
|
||||
cache: false,
|
||||
url: "'.URL::site('admin/service/ajaxlist').'",
|
||||
url: "'.URL::link('admin','service/ajaxlist',TRUE).'",
|
||||
timeout: 2000,
|
||||
error: function() {
|
||||
alert("Failed to submit");
|
||||
|
@@ -28,7 +28,7 @@ class Controller_Admin_Email extends Controller_TemplateDefault_Admin {
|
||||
ORM::factory('Email_Log')->find_all(),
|
||||
25,
|
||||
array(
|
||||
'id'=>array('label'=>'ID','url'=>'user/email/view/'),
|
||||
'id'=>array('label'=>'ID','url'=>URL::link('user','email/view/')),
|
||||
'date_orig'=>array('label'=>'Date'),
|
||||
'email'=>array('label'=>'To'),
|
||||
'translate_resolve("subject")'=>array('label'=>'Subject'),
|
||||
@@ -38,7 +38,7 @@ class Controller_Admin_Email extends Controller_TemplateDefault_Admin {
|
||||
array(
|
||||
'page'=>TRUE,
|
||||
'type'=>'select',
|
||||
'form'=>'user/email/view',
|
||||
'form'=>URL::link('user','email/view'),
|
||||
)),
|
||||
));
|
||||
}
|
||||
@@ -108,7 +108,7 @@ class Controller_Admin_Email extends Controller_TemplateDefault_Admin {
|
||||
$eto = ORM::factory('Email_Template',$id);
|
||||
|
||||
if (! $eto->loaded())
|
||||
HTTP::redirect('email/admin/template/list');
|
||||
HTTP::redirect(URL::link('admin','email/template/list'));
|
||||
|
||||
$output = '';
|
||||
|
||||
|
@@ -26,14 +26,14 @@ class Controller_User_Email extends Controller_TemplateDefault_User {
|
||||
$this->ao->email_log->find_all(),
|
||||
25,
|
||||
array(
|
||||
'id'=>array('label'=>'ID','url'=>'user/email/view/'),
|
||||
'id'=>array('label'=>'ID','url'=>URL::link('user','email/view/')),
|
||||
'date_orig'=>array('label'=>'Date'),
|
||||
'translate_resolve("subject")'=>array('label'=>'Subject'),
|
||||
),
|
||||
array(
|
||||
'page'=>TRUE,
|
||||
'type'=>'select',
|
||||
'form'=>'user/email/view',
|
||||
'form'=>URL::link('user','email/view'),
|
||||
)),
|
||||
));
|
||||
}
|
||||
|
@@ -132,7 +132,7 @@ class Email_Template {
|
||||
throw new Kohana_Exception('Component :component has not been configured in :method',array(':component'=>$component,':method'=>__METHOD__));
|
||||
}
|
||||
} else {
|
||||
$sm->setSubject(_('Email from').' '.Company::name());
|
||||
$sm->setSubject(_('Email from').' '.Company::instance()->name());
|
||||
$sm->setBody(print_r($this->email_data['variables'],TRUE),'text/plain');
|
||||
}
|
||||
}
|
||||
|
@@ -1,4 +1,4 @@
|
||||
<tr>
|
||||
<td><a href="<?php echo URL::site('admin/email/templateedit/'.$template->id); ?>" alt=""><?php echo $template->name; ?></a></td>
|
||||
<td><a href="<?php echo URL::link('admin','email/templateedit/'.$template->id,TRUE); ?>" alt=""><?php echo $template->name; ?></a></td>
|
||||
<td><?php echo $template->display('status'); ?></td>
|
||||
</tr>
|
||||
|
@@ -40,9 +40,9 @@ class Export_Quicken extends Export {
|
||||
// @todo - should be configurable
|
||||
$qio->TERMS = '7 Days';
|
||||
// @todo - should be configurable
|
||||
$qio->INVTITLE = Company::name().' Invoice';
|
||||
$qio->INVTITLE = Company::instance()->name().' Invoice';
|
||||
// @todo - should be configurable
|
||||
$qio->INVMEMO = 'Thank you for using '.Company::name();
|
||||
$qio->INVMEMO = 'Thank you for using '.Company::instance()->name();
|
||||
$qio->DOCNUM = sprintf('%06s',$pio->invoice->id);
|
||||
$qio->DUEDATE = date('m/d/Y',$pio->invoice->due_date);
|
||||
$qio->AMOUNT = sprintf('%3.2f',$pio->invoice->total());
|
||||
|
@@ -41,13 +41,13 @@ class Controller_Admin_Host extends Controller_TemplateDefault_Admin {
|
||||
ORM::factory('Host_Server')->find_all(),
|
||||
25,
|
||||
array(
|
||||
'id'=>array('label'=>'ID','url'=>'admin/host/update/'),
|
||||
'id'=>array('label'=>'ID','url'=>URL::link('admin','host/update/')),
|
||||
'name'=>array('label'=>'Details'),
|
||||
),
|
||||
array(
|
||||
'page'=>TRUE,
|
||||
'type'=>'select',
|
||||
'form'=>'admin/host/update/',
|
||||
'form'=>URL::link('admin','host/update'),
|
||||
)),
|
||||
));
|
||||
}
|
||||
|
@@ -56,7 +56,7 @@ class Model_Host_Server extends ORM_OSB {
|
||||
$("button[name=submit]").click(function() {
|
||||
var t=$(this).val().split(":");
|
||||
if (x++) { alert("Session expired, please refresh the page!"); return false; }
|
||||
$.getJSON("'.URL::site('admin/host/ajaxmanage/'.$this->id).'", { k: "'.$k.'",t: t[1] }, function(data) {
|
||||
$.getJSON("'.URL::link('admin','host/ajaxmanage/'.$this->id,TRUE).'", { k: "'.$k.'",t: t[1] }, function(data) {
|
||||
$.each(data, function(key, val) { $("#"+key+"_"+t[0]+"_"+t[1]).val(val); });
|
||||
})
|
||||
.error(function() { alert("There was a problem with the request"); return false; })
|
||||
|
@@ -46,7 +46,7 @@ class Controller_Admin_Invoice extends Controller_TemplateDefault_Admin {
|
||||
ORM::factory('Invoice')->find_all(),
|
||||
25,
|
||||
array(
|
||||
'id'=>array('label'=>'ID','url'=>'user/invoice/view/'),
|
||||
'id'=>array('label'=>'ID','url'=>URL::link('user','invoice/view/')),
|
||||
'date_orig'=>array('label'=>'Date'),
|
||||
'total(TRUE)'=>array('label'=>'Total','class'=>'right'),
|
||||
'credit_amt'=>array('label'=>'Credits','class'=>'right'),
|
||||
@@ -58,7 +58,7 @@ class Controller_Admin_Invoice extends Controller_TemplateDefault_Admin {
|
||||
array(
|
||||
'page'=>TRUE,
|
||||
'type'=>'select',
|
||||
'form'=>'user/invoice/view',
|
||||
'form'=>URL::link('user','invoice/view'),
|
||||
)),
|
||||
));
|
||||
}
|
||||
|
@@ -76,8 +76,8 @@ class Controller_Task_Invoice extends Controller_Task {
|
||||
'DUE_DATE'=>$io->display('due_date'),
|
||||
'FIRST_NAME'=>$io->account->first_name,
|
||||
'INV_NUM'=>$io->refnum(),
|
||||
'INV_URL'=>URL::site('user/invoice/view/'.$io->id,'http'),
|
||||
'SITE_NAME'=>Company::name(),
|
||||
'INV_URL'=>URL::site(URL::link('user','invoice/view/'.$io->id),'http'),
|
||||
'SITE_NAME'=>Company::instance()->name(),
|
||||
);
|
||||
|
||||
// @todo Record email log id if possible.
|
||||
@@ -131,10 +131,10 @@ class Controller_Task_Invoice extends Controller_Task {
|
||||
'EMAIL'=>Company::email(),
|
||||
'FIRST_NAME'=>$io->account->first_name,
|
||||
'INV_NUM'=>$io->refnum(),
|
||||
'INV_URL'=>URL::site('user/invoice/view/'.$io->id,'http'),
|
||||
'INV_URL'=>URL::site(URL::link('user','invoice/view/'.$io->id),'http'),
|
||||
'LATE_FEE'=>'5.50', // @todo This should come from a config file.
|
||||
'PAYMENTS_TABLE'=>$io->account->payment->list_recent_table(),
|
||||
'SITE_NAME'=>Company::name(),
|
||||
'SITE_NAME'=>Company::instance()->name(),
|
||||
);
|
||||
|
||||
// @todo Record email log id if possible.
|
||||
@@ -303,9 +303,9 @@ class Controller_Task_Invoice extends Controller_Task {
|
||||
'FIRST_NAME'=>$io->account->first_name,
|
||||
'HTML_INVOICE'=>$io->html(),
|
||||
'INV_NUM'=>$io->refnum(),
|
||||
'INV_URL'=>URL::site('user/invoice/view/'.$io->id,'http'),
|
||||
'INV_URL_DOWNLOAD'=>URL::site(sprintf('user/invoice/download/%s?token=%s',$io->id,$token),'http'),
|
||||
'SITE_NAME'=>Company::name(),
|
||||
'INV_URL'=>URL::site(URL::link('user','invoice/view/'.$io->id),'http'),
|
||||
'INV_URL_DOWNLOAD'=>URL::site(URL::link('user',sprintf('invoice/download/%s?token=%s',$io->id,$token)),'http'),
|
||||
'SITE_NAME'=>Company::instance()->name(),
|
||||
);
|
||||
|
||||
// @todo Record email log id if possible.
|
||||
|
@@ -27,7 +27,7 @@ class Controller_User_Invoice extends Controller_TemplateDefault_User {
|
||||
$this->ao->invoice->find_all(),
|
||||
25,
|
||||
array(
|
||||
'id'=>array('label'=>'ID','url'=>'user/invoice/view/'),
|
||||
'id'=>array('label'=>'ID','url'=>URL::link('user','invoice/view/')),
|
||||
'date_orig'=>array('label'=>'Date Issued'),
|
||||
'due_date'=>array('label'=>'Date Due'),
|
||||
'total(TRUE)'=>array('label'=>'Total','class'=>'right'),
|
||||
@@ -38,7 +38,7 @@ class Controller_User_Invoice extends Controller_TemplateDefault_User {
|
||||
array(
|
||||
'page'=>TRUE,
|
||||
'type'=>'select',
|
||||
'form'=>'user/invoice/view',
|
||||
'form'=>URL::link('user','invoice/view'),
|
||||
)),
|
||||
));
|
||||
}
|
||||
@@ -51,7 +51,7 @@ class Controller_User_Invoice extends Controller_TemplateDefault_User {
|
||||
|
||||
$io = ORM::factory('Invoice',$id);
|
||||
|
||||
if (! $io->loaded() OR (! Auth::instance()->authorised($io->account_id,$io->affiliate_id) AND ! in_array($this->ao->affiliate->id,$io->service_affiliates()))) {
|
||||
if (! $io->loaded() AND ! in_array($this->ao->affiliate->id,$io->service_affiliates())) {
|
||||
$this->template->content = 'Unauthorised or doesnt exist?';
|
||||
|
||||
return FALSE;
|
||||
|
@@ -22,6 +22,8 @@ require_once('includes/tcpdf/tcpdf.php');
|
||||
abstract class Invoice_TCPDF extends TCPDF {
|
||||
// Our invoice object
|
||||
protected $io;
|
||||
// Our company object
|
||||
protected $co;
|
||||
|
||||
protected $billToCompany = true;
|
||||
protected $itemsSummaryMax = 16;
|
||||
@@ -48,11 +50,12 @@ abstract class Invoice_TCPDF extends TCPDF {
|
||||
parent::__construct();
|
||||
|
||||
$this->io = $io;
|
||||
$this->co = Company::instance();
|
||||
|
||||
// Set up the invoice
|
||||
$this->SetCreator('Open Source Billing');
|
||||
$this->SetAuthor(Company::name());
|
||||
$this->SetTitle(sprintf('%s Invoice',Company::name()));
|
||||
$this->SetAuthor($this->co->name());
|
||||
$this->SetTitle(sprintf('%s Invoice',$this->co->name()));
|
||||
$this->SetSubject(sprintf('Invoice #%06s',$this->io->id()));
|
||||
$this->SetKeywords($this->io->id());
|
||||
$this->SetAutoPageBreak(TRUE,25);
|
||||
|
@@ -23,7 +23,7 @@ class Invoice_TCPDF_Default extends Invoice_TCPDF {
|
||||
public function drawCompanyLogo() {
|
||||
$x = 9; $y = 7;
|
||||
$size = 25;
|
||||
$logo = Config::logo_file();
|
||||
$logo = $this->co->logo_file();
|
||||
|
||||
if (is_file($logo))
|
||||
$this->Image($logo,$x,$y,$size);
|
||||
@@ -37,17 +37,17 @@ class Invoice_TCPDF_Default extends Invoice_TCPDF {
|
||||
$x = 40; $y = 7;
|
||||
|
||||
$this->SetFont('helvetica','B',10);
|
||||
$this->SetXY($x,$y); $this->Cell(0,0,Company::name()); $y += 4;
|
||||
$this->SetXY($x,$y); $this->Cell(0,0,$this->co->name()); $y += 4;
|
||||
|
||||
$this->SetFont('helvetica','',10);
|
||||
$this->SetXY($x,$y); $this->Cell(0,0,Company::taxid()); $y += 6;
|
||||
$this->SetXY($x,$y); $this->Cell(0,0,$this->co->taxid()); $y += 6;
|
||||
|
||||
$this->SetXY($x,$y); $this->Cell(0,0,Company::street(', ')); $y += 4;
|
||||
$this->SetXY($x,$y); $this->Cell(0,0,sprintf('%s, %s %s',Company::city(),Company::state(),Company::pcode())); $y += 4;
|
||||
$this->SetXY($x,$y); $this->Cell(0,0,$this->co->street(', ')); $y += 4;
|
||||
$this->SetXY($x,$y); $this->Cell(0,0,sprintf('%s, %s %s',$this->co->city(),$this->co->state(),$this->co->pcode())); $y += 4;
|
||||
|
||||
$y += 2;
|
||||
$this->SetXY($x,$y); $this->Cell(0,0,'Phone:'); $this->SetXY($x+16,$y); $this->Cell(0,0,Company::phone()); $y += 4;
|
||||
$this->SetXY($x,$y); $this->Cell(0,0,'Fax:'); $this->SetXY($x+16,$y); $this->Cell(0,0,Company::fax()); $y += 4;
|
||||
$this->SetXY($x,$y); $this->Cell(0,0,'Phone:'); $this->SetXY($x+16,$y); $this->Cell(0,0,$this->co->phone()); $y += 4;
|
||||
$this->SetXY($x,$y); $this->Cell(0,0,'Fax:'); $this->SetXY($x+16,$y); $this->Cell(0,0,$this->co->fax()); $y += 4;
|
||||
$this->SetXY($x,$y); $this->Cell(0,0,'Web:'); $this->SetXY($x+16,$y); $this->addHtmlLink(URL::base(TRUE,TRUE),URL::base(TRUE,TRUE)); $y += 4;
|
||||
}
|
||||
|
||||
@@ -65,7 +65,7 @@ class Invoice_TCPDF_Default extends Invoice_TCPDF {
|
||||
|
||||
$this->SetFont('helvetica','',8);
|
||||
$this->SetXY($x,$y); $this->Cell(0,0,_('Please return this portion with your cheque or money order')); $y +=3;
|
||||
$this->SetXY($x,$y); $this->Cell(0,0,_('made payable to').' '.Company::name());
|
||||
$this->SetXY($x,$y); $this->Cell(0,0,_('made payable to').' '.$this->co->name());
|
||||
|
||||
// Due Date
|
||||
$x = 110; $y = 200;
|
||||
@@ -91,9 +91,9 @@ class Invoice_TCPDF_Default extends Invoice_TCPDF {
|
||||
// Company Address
|
||||
$y = 216;
|
||||
$this->SetFont('helvetica','',10);
|
||||
$this->SetXY(18,$y); $this->Cell(0,0,Company::name()); $y += 4;
|
||||
$this->SetXY(18,$y); $this->Cell(0,0,Company::street(', ')); $y += 4;
|
||||
$this->SetXY(18,$y); $this->Cell(0,0,sprintf('%s, %s %s',Company::city(),Company::state(),Company::pcode())); $y += 4;
|
||||
$this->SetXY(18,$y); $this->Cell(0,0,$this->co->name()); $y += 4;
|
||||
$this->SetXY(18,$y); $this->Cell(0,0,$this->co->street(', ')); $y += 4;
|
||||
$this->SetXY(18,$y); $this->Cell(0,0,sprintf('%s, %s %s',$this->co->city(),$this->co->state(),$this->co->pcode())); $y += 4;
|
||||
|
||||
// Previous Due
|
||||
$y = 215;
|
||||
|
@@ -4,8 +4,8 @@
|
||||
<td style="vertical-align: top">
|
||||
<table class="company_details" border="0">
|
||||
<tr>
|
||||
<td class="logo"><?php echo Config::logo(); ?></td>
|
||||
<td class="address"><span class="company_name"><?php echo Company::name(); ?></span><br/><?php echo Company::address(); ?><br/><?php echo Company::contacts(); ?></td>
|
||||
<td class="logo"><?php echo Company::instance()->logo(); ?></td>
|
||||
<td class="address"><span class="company_name"><?php echo Company::instance()->name(); ?></span><br/><?php echo Company::instance()->address(); ?><br/><?php echo Company::instance()->contacts(); ?></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
|
@@ -4,14 +4,14 @@
|
||||
<td style="vertical-align: top">
|
||||
<table class="company_details" border="0">
|
||||
<tr>
|
||||
<td class="logo"><?php echo Config::logo(); ?></td>
|
||||
<td class="logo"><?php echo Company::instance()->logo(); ?></td>
|
||||
<td class="address">
|
||||
<span class="company_name"><?php echo Company::name(); ?></span><br/>
|
||||
<?php echo Company::taxid(); ?><br/>
|
||||
<span class="company_name"><?php echo Company::instance()->name(); ?></span><br/>
|
||||
<?php echo Company::instance()->taxid(); ?><br/>
|
||||
<br/>
|
||||
<?php echo Company::address(); ?><br/>
|
||||
<?php echo Company::instance()->address(); ?><br/>
|
||||
<br/>
|
||||
<?php echo Company::contacts(); ?>
|
||||
<?php echo Company::instance()->contacts(); ?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -85,7 +85,7 @@
|
||||
$lp = $ito->product_id; ?>
|
||||
<!-- Service Information -->
|
||||
<tr class="head">
|
||||
<td><?php echo HTML::anchor('/user/service/view/'.$ito->service_id,$ito->service->id()); ?></td>
|
||||
<td><?php echo HTML::anchor(URL::link('user','service/view/'.$ito->service_id),$ito->service->id()); ?></td>
|
||||
<td colspan="5"><?php printf('%s - %s',$ito->product->name(),$ito->service->name()); ?> (<?php echo $ito->product_id; ?>)</td>
|
||||
<td class="right"><?php echo ($i++==0 ? Currency::display($io->items_service_total($ito->service_id)) : ' ');?></td>
|
||||
</tr>
|
||||
@@ -213,6 +213,6 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php echo HTML::anchor('user/invoice/download/'.$io->id,'Download detailed invoice'); ?></td>
|
||||
<td><?php echo HTML::anchor(URL::link('user','invoice/download/'.$io->id),'Download detailed invoice'); ?></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
@@ -18,7 +18,7 @@ class lnApp_Controller_Login extends Controller_TemplateDefault {
|
||||
// If user already signed-in
|
||||
if (Auth::instance()->logged_in()!= 0) {
|
||||
// Redirect to the user account
|
||||
HTTP::redirect('user/welcome/index');
|
||||
HTTP::redirect(URL::link('user','welcome/index'));
|
||||
}
|
||||
|
||||
// If there is a post and $_POST is not empty
|
||||
@@ -35,7 +35,7 @@ class lnApp_Controller_Login extends Controller_TemplateDefault {
|
||||
HTTP::redirect($redir);
|
||||
|
||||
} else
|
||||
HTTP::redirect('user/welcome/index');
|
||||
HTTP::redirect(URL::link('user','welcome/index'));
|
||||
|
||||
} else {
|
||||
// We are not successful logging in, so delete our session data
|
||||
|
@@ -166,7 +166,7 @@ abstract class lnApp_Controller_TemplateDefault extends Controller_Template {
|
||||
$this->template->title = '';
|
||||
|
||||
// Language
|
||||
$this->meta->language = Config::instance()->so->language->iso;
|
||||
$this->meta->language = Config::language();
|
||||
|
||||
// Description
|
||||
$this->meta->description = sprintf('%s::%s',$this->request->controller(),$this->request->action());
|
||||
@@ -243,7 +243,7 @@ abstract class lnApp_Controller_TemplateDefault extends Controller_Template {
|
||||
}
|
||||
|
||||
public function _footer() {
|
||||
return sprintf('© %s',Config::SiteName());
|
||||
return sprintf('© %s',Config::sitename());
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -108,7 +108,7 @@ $(function () {
|
||||
'attr'=>array('id'=>sprintf('B_%s',$branch['id'])),
|
||||
'state'=>$branch['state'],
|
||||
'data'=>array('title'=>$branch['name']),
|
||||
'attr'=>array('id'=>sprintf('N_%s',$branch['id']),'href'=>empty($branch['attr_href']) ? URL::site(sprintf('user/%s/menu',$branch['name'])) : $branch['attr_href']),
|
||||
'attr'=>array('id'=>sprintf('N_%s',$branch['id']),'href'=>empty($branch['attr_href']) ? URL::link('user',$branch['name'].'/menu',TRUE) : $branch['attr_href']),
|
||||
)
|
||||
);
|
||||
}
|
||||
|
@@ -79,7 +79,7 @@ class Controller_Admin_Payment extends Controller_TemplateDefault_Admin {
|
||||
ORM::factory('Payment')->find_all(),
|
||||
25,
|
||||
array(
|
||||
'id'=>array('label'=>'ID','url'=>'admin/payment/view/'),
|
||||
'id'=>array('label'=>'ID','url'=>URL::link('admin','payment/view/')),
|
||||
'date_payment'=>array('label'=>'Date'),
|
||||
'account->accnum()'=>array('class'=>'right'),
|
||||
'account->name()'=>array('label'=>'Account'),
|
||||
@@ -91,7 +91,7 @@ class Controller_Admin_Payment extends Controller_TemplateDefault_Admin {
|
||||
array(
|
||||
'page'=>TRUE,
|
||||
'type'=>'select',
|
||||
'form'=>'admin/payment/view',
|
||||
'form'=>URL::link('admin','payment/view'),
|
||||
)),
|
||||
));
|
||||
}
|
||||
@@ -151,7 +151,7 @@ class Controller_Admin_Payment extends Controller_TemplateDefault_Admin {
|
||||
}
|
||||
});
|
||||
$("input[name=account_id]").autocomplete({
|
||||
source: "'.URL::site('admin/payment/ajaxlist').'",
|
||||
source: "'.URL::link('admin','payment/ajaxlist',TRUE).'",
|
||||
minLength: 2,
|
||||
change: function(event,ui) {
|
||||
// Send the request and update sub category dropdown
|
||||
@@ -160,7 +160,7 @@ class Controller_Admin_Payment extends Controller_TemplateDefault_Admin {
|
||||
data: "key="+$(this).val(),
|
||||
dataType: "html",
|
||||
cache: false,
|
||||
url: "'.URL::site('admin/payment/autoitemlist').'",
|
||||
url: "'.URL::link('admin','payment/autoitemlist',TRUE).'",
|
||||
timeout: 2000,
|
||||
error: function(x) {
|
||||
alert("Failed to submit");
|
||||
@@ -177,7 +177,7 @@ class Controller_Admin_Payment extends Controller_TemplateDefault_Admin {
|
||||
if ($po->loaded()) {
|
||||
Script::add(array('type'=>'stdin','data'=>'
|
||||
$(document).ready(function() {
|
||||
$("div[id=items]").load("'.URL::site('admin/payment/autoitemlist').'", {key: "'.$po->account_id.'", pid: "'.$po->id.'" });
|
||||
$("div[id=items]").load("'.URL::link('admin','payment/autoitemlist',TRUE).'", {key: "'.$po->account_id.'", pid: "'.$po->id.'" });
|
||||
});'
|
||||
));
|
||||
}
|
||||
|
@@ -41,8 +41,8 @@ class Payment_Bulk_Ezypay {
|
||||
$array = explode("\t",$line);
|
||||
|
||||
// Field 4 has our account reference
|
||||
if (preg_match('/^'.Config::siteid(TRUE).'-/',$array[4]) AND $array[10] == 'Cleared') {
|
||||
$aid = preg_replace('/^'.Config::siteid(TRUE).'-/','',$array[4]);
|
||||
if (preg_match('/^'.Company::instance()->site(TRUE).'-/',$array[4]) AND $array[10] == 'Cleared') {
|
||||
$aid = preg_replace('/^'.Compan::instance()->site(TRUE).'-/','',$array[4]);
|
||||
|
||||
$po = ORM::factory('Payment');
|
||||
$po->account_id = $aid;
|
||||
|
@@ -1,5 +1,5 @@
|
||||
<tr>
|
||||
<td><?php echo HTML::anchor('admin/payment/view/'.$o->id,$o->display('id')); ?></td>
|
||||
<td><?php echo HTML::anchor(URL::link('admin','payment/view/'.$o->id),$o->display('id')); ?></td>
|
||||
<td><?php echo $o->display('date_payment'); ?></td>
|
||||
<td><?php echo $o->display('total_amt'); ?></td>
|
||||
<td><?php echo $o->display('fees_amt'); ?></td>
|
||||
|
@@ -1,5 +1,5 @@
|
||||
<tr class="<?php echo $trc; ?>">
|
||||
<td><?php echo HTML::anchor('user/invoice/view/'.$io->id,$io->id()); ?></td>
|
||||
<td><?php echo HTML::anchor(URL::link('user','invoice/view/'.$io->id),$io->id()); ?></td>
|
||||
<td><?php echo $io->display('date_orig'); ?></td>
|
||||
<td><?php echo $io->display('due_date'); ?></td>
|
||||
<td><?php echo $io->total(TRUE); ?></td>
|
||||
|
@@ -49,7 +49,7 @@ class Controller_Admin_Product extends Controller_TemplateDefault_Admin {
|
||||
$prods,
|
||||
25,
|
||||
array(
|
||||
'id'=>array('label'=>'ID','url'=>'admin/product/view/'),
|
||||
'id'=>array('label'=>'ID','url'=>URL::link('admin','product/view/')),
|
||||
'name()'=>array('label'=>'Details'),
|
||||
'status'=>array('label'=>'Active'),
|
||||
'prod_plugin_file'=>array('label'=>'Plugin Name'),
|
||||
@@ -62,7 +62,7 @@ class Controller_Admin_Product extends Controller_TemplateDefault_Admin {
|
||||
array(
|
||||
'page'=>TRUE,
|
||||
'type'=>'select',
|
||||
'form'=>'admin/product/view',
|
||||
'form'=>URL::link('admin','product/view'),
|
||||
)),
|
||||
));
|
||||
}
|
||||
@@ -102,7 +102,7 @@ class Controller_Admin_Product extends Controller_TemplateDefault_Admin {
|
||||
data: "key="+$(this).val(),
|
||||
dataType: "html",
|
||||
cache: false,
|
||||
url: "'.URL::site('admin/product/ajaxtranslateform/'.$po->id).'",
|
||||
url: "'.URL::link('admin','product/ajaxtranslateform/'.$po->id,TRUE).'",
|
||||
timeout: 2000,
|
||||
error: function(x) {
|
||||
alert("Failed to submit");
|
||||
@@ -125,7 +125,7 @@ class Controller_Admin_Product extends Controller_TemplateDefault_Admin {
|
||||
ORM::factory('Service')->where('product_id','=',$po->id)->find_all(),
|
||||
25,
|
||||
array(
|
||||
'id'=>array('label'=>'ID','url'=>'user/service/view/'),
|
||||
'id'=>array('label'=>'ID','url'=>URL::link('user','service/view/')),
|
||||
'account->accnum()'=>array(),
|
||||
'account->name()'=>array('label'=>'Account'),
|
||||
'name()'=>array('label'=>'Details'),
|
||||
@@ -135,7 +135,7 @@ class Controller_Admin_Product extends Controller_TemplateDefault_Admin {
|
||||
array(
|
||||
'page'=>TRUE,
|
||||
'type'=>'select',
|
||||
'form'=>'user/service/view',
|
||||
'form'=>URL::link('user','service/view'),
|
||||
)),
|
||||
));
|
||||
}
|
||||
|
@@ -25,9 +25,9 @@ class Model_Product_Category extends ORM_OSB {
|
||||
// If the user is not logged in, show the site default language
|
||||
// @todo This needs to change to the session language.
|
||||
if (! $ao=Auth::instance()->get_user())
|
||||
$ao=Config::instance()->so;
|
||||
$ao=Company::instance()->so();
|
||||
|
||||
return ($a=$this->product_category_translate->where('language_id','=',$ao->language_id)->find()->description) ? $a : _('No Description');
|
||||
return ($x=$this->product_category_translate->where('language_id','=',$ao->language_id)->find()->description) ? $x : _('No Description');
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -74,7 +74,7 @@ class Controller_Admin_Service extends Controller_TemplateDefault_Admin {
|
||||
ORM::factory('Service')->find_all(),
|
||||
25,
|
||||
array(
|
||||
'id'=>array('label'=>'ID','url'=>'user/service/view/'),
|
||||
'id'=>array('label'=>'ID','url'=>URL::link('user','service/view/')),
|
||||
'service_name()'=>array('label'=>'Details'),
|
||||
'recur_schedule'=>array('label'=>'Billing'),
|
||||
'price(TRUE,TRUE)'=>array('label'=>'Price','class'=>'right'),
|
||||
@@ -85,7 +85,7 @@ class Controller_Admin_Service extends Controller_TemplateDefault_Admin {
|
||||
array(
|
||||
'page'=>TRUE,
|
||||
'type'=>'select',
|
||||
'form'=>'user/service/view',
|
||||
'form'=>URL::link('user','service/view'),
|
||||
)),
|
||||
));
|
||||
}
|
||||
@@ -111,7 +111,7 @@ class Controller_Admin_Service extends Controller_TemplateDefault_Admin {
|
||||
$svs,
|
||||
25,
|
||||
array(
|
||||
'id'=>array('label'=>'ID','url'=>'user/service/view/'),
|
||||
'id'=>array('label'=>'ID','url'=>URL::link('user','service/view/')),
|
||||
'service_name()'=>array('label'=>'Details'),
|
||||
'recur_schedule'=>array('label'=>'Billing'),
|
||||
'price(TRUE,TRUE)'=>array('label'=>'Price','class'=>'right'),
|
||||
@@ -124,7 +124,7 @@ class Controller_Admin_Service extends Controller_TemplateDefault_Admin {
|
||||
array(
|
||||
'page'=>TRUE,
|
||||
'type'=>'select',
|
||||
'form'=>'user/service/view',
|
||||
'form'=>URL::link('user','service/view'),
|
||||
)),
|
||||
));
|
||||
|
||||
@@ -143,7 +143,7 @@ class Controller_Admin_Service extends Controller_TemplateDefault_Admin {
|
||||
$svs,
|
||||
25,
|
||||
array(
|
||||
'id'=>array('label'=>'ID','url'=>'user/service/view/'),
|
||||
'id'=>array('label'=>'ID','url'=>URL::link('user','service/view/')),
|
||||
'service_name()'=>array('label'=>'Details'),
|
||||
'recur_schedule'=>array('label'=>'Billing'),
|
||||
'price(TRUE,TRUE)'=>array('label'=>'Price','class'=>'right'),
|
||||
@@ -156,7 +156,7 @@ class Controller_Admin_Service extends Controller_TemplateDefault_Admin {
|
||||
array(
|
||||
'page'=>TRUE,
|
||||
'type'=>'select',
|
||||
'form'=>'user/service/view',
|
||||
'form'=>URL::link('user','service/view'),
|
||||
)),
|
||||
));
|
||||
}
|
||||
@@ -198,7 +198,7 @@ class Controller_Admin_Service extends Controller_TemplateDefault_Admin {
|
||||
$svs = ORM::factory('Service')->list_bylistgroup('ADSL');
|
||||
|
||||
$google = GoogleChart::factory('ComboChart')
|
||||
->dataurl(URL::site('admin/service/ajaxjson_traffic'))
|
||||
->dataurl(URL::link('admin','service/ajaxjson_traffic',TRUE))
|
||||
->title(sprintf('ADSL traffic as at %s',date('Y-m-d',strtotime('yesterday'))));
|
||||
|
||||
Block::add(array('body'=>(string)$google));
|
||||
@@ -209,7 +209,7 @@ class Controller_Admin_Service extends Controller_TemplateDefault_Admin {
|
||||
$svs,
|
||||
NULL,
|
||||
array(
|
||||
'id'=>array('label'=>'ID','url'=>'user/service/view/'),
|
||||
'id'=>array('label'=>'ID','url'=>URL::link('user','service/view/')),
|
||||
'name()'=>array('label'=>'Service'),
|
||||
'plugin()->ipaddress()'=>array('label'=>'IP Address'),
|
||||
'product->plugin()->speed'=>array('label'=>'Speed'),
|
||||
@@ -225,7 +225,7 @@ class Controller_Admin_Service extends Controller_TemplateDefault_Admin {
|
||||
),
|
||||
array(
|
||||
'type'=>'select',
|
||||
'form'=>'user/service/view',
|
||||
'form'=>URL::link('user','service/view'),
|
||||
)),
|
||||
));
|
||||
}
|
||||
@@ -244,14 +244,14 @@ class Controller_Admin_Service extends Controller_TemplateDefault_Admin {
|
||||
$svs,
|
||||
NULL,
|
||||
array(
|
||||
'id'=>array('label'=>'ID','url'=>'user/service/view/'),
|
||||
'id'=>array('label'=>'ID','url'=>URL::link('user','service/view/')),
|
||||
'service_name()'=>array('label'=>'Service'),
|
||||
'expire(TRUE)'=>array('label'=>'Expires'),
|
||||
'due(TRUE)'=>array('label'=>'Due'),
|
||||
),
|
||||
array(
|
||||
'type'=>'select',
|
||||
'form'=>'user/service/view',
|
||||
'form'=>URL::link('user','service/view'),
|
||||
)),
|
||||
));
|
||||
}
|
||||
@@ -277,7 +277,7 @@ class Controller_Admin_Service extends Controller_TemplateDefault_Admin {
|
||||
$svs,
|
||||
NULL,
|
||||
array(
|
||||
'id'=>array('label'=>'ID','url'=>'user/service/view/'),
|
||||
'id'=>array('label'=>'ID','url'=>URL::link('user','service/view/')),
|
||||
'name()'=>array('label'=>'Service'),
|
||||
'plugin()->ipaddress()'=>array('label'=>'IP Address'),
|
||||
'product->plugin()->speed'=>array('label'=>'Speed'),
|
||||
@@ -292,7 +292,7 @@ class Controller_Admin_Service extends Controller_TemplateDefault_Admin {
|
||||
),
|
||||
array(
|
||||
'type'=>'select',
|
||||
'form'=>'user/service/view',
|
||||
'form'=>URL::link('user','service/view'),
|
||||
)),
|
||||
));
|
||||
}
|
||||
@@ -307,7 +307,7 @@ class Controller_Admin_Service extends Controller_TemplateDefault_Admin {
|
||||
$svs,
|
||||
25,
|
||||
array(
|
||||
'id'=>array('label'=>'ID','url'=>'user/service/view/'),
|
||||
'id'=>array('label'=>'ID','url'=>URL::link('user','service/view/')),
|
||||
'service_name()'=>array('label'=>'Details'),
|
||||
'plugin()->display("domain_expire")'=>array('label'=>'Expire'),
|
||||
'recur_schedule'=>array('label'=>'Billing'),
|
||||
@@ -319,7 +319,7 @@ class Controller_Admin_Service extends Controller_TemplateDefault_Admin {
|
||||
array(
|
||||
'page'=>TRUE,
|
||||
'type'=>'select',
|
||||
'form'=>'user/service/view',
|
||||
'form'=>URL::link('user','service/view'),
|
||||
)),
|
||||
));
|
||||
}
|
||||
@@ -340,7 +340,7 @@ class Controller_Admin_Service extends Controller_TemplateDefault_Admin {
|
||||
$list[$sid],
|
||||
25,
|
||||
array(
|
||||
'id'=>array('label'=>'ID','url'=>'user/service/view/'),
|
||||
'id'=>array('label'=>'ID','url'=>URL::link('user','service/view/')),
|
||||
'service_name()'=>array('label'=>'Details'),
|
||||
'plugin()->display("domain_expire")'=>array('label'=>'Expire'),
|
||||
'recur_schedule'=>array('label'=>'Billing'),
|
||||
@@ -352,7 +352,7 @@ class Controller_Admin_Service extends Controller_TemplateDefault_Admin {
|
||||
array(
|
||||
'page'=>TRUE,
|
||||
'type'=>'select',
|
||||
'form'=>'user/service/view',
|
||||
'form'=>URL::link('user','service/view'),
|
||||
)),
|
||||
));
|
||||
}
|
||||
@@ -373,7 +373,7 @@ class Controller_Admin_Service extends Controller_TemplateDefault_Admin {
|
||||
$list[$sid],
|
||||
25,
|
||||
array(
|
||||
'id'=>array('label'=>'ID','url'=>'user/service/view/'),
|
||||
'id'=>array('label'=>'ID','url'=>URL::link('user','service/view/')),
|
||||
'service_name()'=>array('label'=>'Details'),
|
||||
'plugin()->domain_registrar->id'=>array('label'=>'SID'),
|
||||
'plugin()->domain_registrar->name'=>array('label'=>'Supplier'),
|
||||
@@ -382,7 +382,7 @@ class Controller_Admin_Service extends Controller_TemplateDefault_Admin {
|
||||
array(
|
||||
'page'=>TRUE,
|
||||
'type'=>'select',
|
||||
'form'=>'user/service/view',
|
||||
'form'=>URL::link('user','service/view'),
|
||||
)),
|
||||
));
|
||||
}
|
||||
@@ -397,7 +397,7 @@ class Controller_Admin_Service extends Controller_TemplateDefault_Admin {
|
||||
$svs,
|
||||
25,
|
||||
array(
|
||||
'id'=>array('label'=>'ID','url'=>'user/service/view/'),
|
||||
'id'=>array('label'=>'ID','url'=>URL::link('user','service/view/')),
|
||||
'service_name()'=>array('label'=>'Details'),
|
||||
'plugin()->display("host_expire")'=>array('label'=>'Expire'),
|
||||
'recur_schedule'=>array('label'=>'Billing'),
|
||||
@@ -409,7 +409,7 @@ class Controller_Admin_Service extends Controller_TemplateDefault_Admin {
|
||||
array(
|
||||
'page'=>TRUE,
|
||||
'type'=>'select',
|
||||
'form'=>'user/service/view',
|
||||
'form'=>URL::link('user','service/view'),
|
||||
)),
|
||||
));
|
||||
}
|
||||
@@ -430,7 +430,7 @@ class Controller_Admin_Service extends Controller_TemplateDefault_Admin {
|
||||
$list[$sid],
|
||||
25,
|
||||
array(
|
||||
'id'=>array('label'=>'ID','url'=>'user/service/view/'),
|
||||
'id'=>array('label'=>'ID','url'=>URL::link('user','service/view/')),
|
||||
'service_name()'=>array('label'=>'Details'),
|
||||
'plugin()->display("host_expire")'=>array('label'=>'Expire'),
|
||||
'recur_schedule'=>array('label'=>'Billing'),
|
||||
@@ -442,7 +442,7 @@ class Controller_Admin_Service extends Controller_TemplateDefault_Admin {
|
||||
array(
|
||||
'page'=>TRUE,
|
||||
'type'=>'select',
|
||||
'form'=>'user/service/view',
|
||||
'form'=>URL::link('user','service/view'),
|
||||
)),
|
||||
));
|
||||
}
|
||||
@@ -457,7 +457,7 @@ class Controller_Admin_Service extends Controller_TemplateDefault_Admin {
|
||||
$svs,
|
||||
25,
|
||||
array(
|
||||
'id'=>array('label'=>'ID','url'=>'user/service/view/'),
|
||||
'id'=>array('label'=>'ID','url'=>URL::link('user','service/view/')),
|
||||
'service_name()'=>array('label'=>'Details'),
|
||||
'recur_schedule'=>array('label'=>'Billing'),
|
||||
'price(TRUE,TRUE)'=>array('label'=>'Price','class'=>'right'),
|
||||
@@ -468,7 +468,7 @@ class Controller_Admin_Service extends Controller_TemplateDefault_Admin {
|
||||
array(
|
||||
'page'=>TRUE,
|
||||
'type'=>'select',
|
||||
'form'=>'user/service/view',
|
||||
'form'=>URL::link('user','service/view'),
|
||||
)),
|
||||
));
|
||||
}
|
||||
@@ -647,7 +647,7 @@ class Controller_Admin_Service extends Controller_TemplateDefault_Admin {
|
||||
ORM::factory('Service')->list_invoicesoon(ORM::factory('Invoice')->config('GEN_SOON_DAYS')),
|
||||
25,
|
||||
array(
|
||||
'id'=>array('label'=>'ID','url'=>'user/service/view/'),
|
||||
'id'=>array('label'=>'ID','url'=>URL::link('user','service/view/')),
|
||||
'service_name()'=>array('label'=>'Details'),
|
||||
'recur_schedule'=>array('label'=>'Billing'),
|
||||
'date_next_invoice'=>array('label'=>'Next Invoice'),
|
||||
@@ -660,7 +660,7 @@ class Controller_Admin_Service extends Controller_TemplateDefault_Admin {
|
||||
array(
|
||||
'page'=>TRUE,
|
||||
'type'=>'select',
|
||||
'form'=>'user/service/view',
|
||||
'form'=>URL::link('user','service/view'),
|
||||
)),
|
||||
));
|
||||
}
|
||||
@@ -779,7 +779,7 @@ class Controller_Admin_Service extends Controller_TemplateDefault_Admin {
|
||||
}
|
||||
|
||||
if (isset($_REQUEST['go']))
|
||||
HTTP::redirect('admin/service/view/'.$so->id);
|
||||
HTTP::redirect(URL::link('admin','service/view/'.$so->id));
|
||||
|
||||
Block::add(array(
|
||||
'title'=>sprintf('Transaction History for %s: %s',$so->id(),$so->name()),
|
||||
|
@@ -30,7 +30,7 @@ class Controller_Affiliate_Service extends Controller_TemplateDefault_Affiliate
|
||||
$this->filter(ORM::factory('Service')->list_active(),$this->ao->affiliate->id),
|
||||
25,
|
||||
array(
|
||||
'id'=>array('label'=>'ID','url'=>'user/service/view/'),
|
||||
'id'=>array('label'=>'ID','url'=>URL::link('user','service/view/')),
|
||||
'service_name()'=>array('label'=>'Details'),
|
||||
'recur_schedule'=>array('label'=>'Billing'),
|
||||
'price(TRUE,TRUE)'=>array('label'=>'Price','class'=>'right'),
|
||||
@@ -41,7 +41,7 @@ class Controller_Affiliate_Service extends Controller_TemplateDefault_Affiliate
|
||||
array(
|
||||
'page'=>TRUE,
|
||||
'type'=>'select',
|
||||
'form'=>'user/service/view',
|
||||
'form'=>URL::link('user','service/view'),
|
||||
)),
|
||||
));
|
||||
}
|
||||
@@ -67,7 +67,7 @@ class Controller_Affiliate_Service extends Controller_TemplateDefault_Affiliate
|
||||
$svs,
|
||||
25,
|
||||
array(
|
||||
'id'=>array('label'=>'ID','url'=>'user/service/view/'),
|
||||
'id'=>array('label'=>'ID','url'=>URL::link('user','service/view/')),
|
||||
'service_name()'=>array('label'=>'Details'),
|
||||
'recur_schedule'=>array('label'=>'Billing'),
|
||||
'price(TRUE,TRUE)'=>array('label'=>'Price','class'=>'right'),
|
||||
@@ -80,7 +80,7 @@ class Controller_Affiliate_Service extends Controller_TemplateDefault_Affiliate
|
||||
array(
|
||||
'page'=>TRUE,
|
||||
'type'=>'select',
|
||||
'form'=>'user/service/view',
|
||||
'form'=>URL::link('user','service/view'),
|
||||
)),
|
||||
));
|
||||
else
|
||||
@@ -104,7 +104,7 @@ class Controller_Affiliate_Service extends Controller_TemplateDefault_Affiliate
|
||||
$svs,
|
||||
25,
|
||||
array(
|
||||
'id'=>array('label'=>'ID','url'=>'user/service/view/'),
|
||||
'id'=>array('label'=>'ID','url'=>URL::link('user','service/view/')),
|
||||
'service_name()'=>array('label'=>'Details'),
|
||||
'recur_schedule'=>array('label'=>'Billing'),
|
||||
'price(TRUE,TRUE)'=>array('label'=>'Price','class'=>'right'),
|
||||
@@ -117,7 +117,7 @@ class Controller_Affiliate_Service extends Controller_TemplateDefault_Affiliate
|
||||
array(
|
||||
'page'=>TRUE,
|
||||
'type'=>'select',
|
||||
'form'=>'user/service/view',
|
||||
'form'=>URL::link('user','service/view'),
|
||||
)),
|
||||
));
|
||||
}
|
||||
@@ -176,7 +176,7 @@ class Controller_Affiliate_Service extends Controller_TemplateDefault_Affiliate
|
||||
$svs,
|
||||
NULL,
|
||||
array(
|
||||
'id'=>array('label'=>'ID','url'=>'user/service/view/'),
|
||||
'id'=>array('label'=>'ID','url'=>URL::link('user','service/view/')),
|
||||
'name()'=>array('label'=>'Service'),
|
||||
'plugin()->ipaddress()'=>array('label'=>'IP Address'),
|
||||
'product->plugin()->speed'=>array('label'=>'Speed'),
|
||||
@@ -191,7 +191,7 @@ class Controller_Affiliate_Service extends Controller_TemplateDefault_Affiliate
|
||||
),
|
||||
array(
|
||||
'type'=>'select',
|
||||
'form'=>'user/service/view',
|
||||
'form'=>URL::link('user','service/view'),
|
||||
)),
|
||||
));
|
||||
}
|
||||
@@ -217,7 +217,7 @@ class Controller_Affiliate_Service extends Controller_TemplateDefault_Affiliate
|
||||
$svs,
|
||||
NULL,
|
||||
array(
|
||||
'id'=>array('label'=>'ID','url'=>'user/service/view/'),
|
||||
'id'=>array('label'=>'ID','url'=>URL::link('user','service/view/')),
|
||||
'name()'=>array('label'=>'Service'),
|
||||
'plugin()->ipaddress()'=>array('label'=>'IP Address'),
|
||||
'product->plugin()->speed'=>array('label'=>'Speed'),
|
||||
@@ -232,7 +232,7 @@ class Controller_Affiliate_Service extends Controller_TemplateDefault_Affiliate
|
||||
),
|
||||
array(
|
||||
'type'=>'select',
|
||||
'form'=>'user/service/view',
|
||||
'form'=>URL::link('user','service/view'),
|
||||
)),
|
||||
));
|
||||
}
|
||||
@@ -244,7 +244,7 @@ class Controller_Affiliate_Service extends Controller_TemplateDefault_Affiliate
|
||||
$this->filter(ORM::factory('Service')->list_bylistgroup('DOMAIN'),$this->ao->affiliate->id,'name()'),
|
||||
25,
|
||||
array(
|
||||
'id'=>array('label'=>'ID','url'=>'user/service/view/'),
|
||||
'id'=>array('label'=>'ID','url'=>URL::link('user','service/view/')),
|
||||
'service_name()'=>array('label'=>'Details'),
|
||||
'plugin()->display("domain_expire")'=>array('label'=>'Expire'),
|
||||
'recur_schedule'=>array('label'=>'Billing'),
|
||||
@@ -256,7 +256,7 @@ class Controller_Affiliate_Service extends Controller_TemplateDefault_Affiliate
|
||||
array(
|
||||
'page'=>TRUE,
|
||||
'type'=>'select',
|
||||
'form'=>'user/service/view',
|
||||
'form'=>URL::link('user','service/view'),
|
||||
)),
|
||||
));
|
||||
}
|
||||
@@ -268,7 +268,7 @@ class Controller_Affiliate_Service extends Controller_TemplateDefault_Affiliate
|
||||
$this->filter(ORM::factory('Service')->list_bylistgroup('HOST'),$this->ao->affiliate->id,'name()'),
|
||||
25,
|
||||
array(
|
||||
'id'=>array('label'=>'ID','url'=>'user/service/view/'),
|
||||
'id'=>array('label'=>'ID','url'=>URL::link('user','service/view/')),
|
||||
'service_name()'=>array('label'=>'Details'),
|
||||
'plugin()->display("host_expire")'=>array('label'=>'Expire'),
|
||||
'recur_schedule'=>array('label'=>'Billing'),
|
||||
@@ -280,7 +280,7 @@ class Controller_Affiliate_Service extends Controller_TemplateDefault_Affiliate
|
||||
array(
|
||||
'page'=>TRUE,
|
||||
'type'=>'select',
|
||||
'form'=>'user/service/view',
|
||||
'form'=>URL::link('user','service/view'),
|
||||
)),
|
||||
));
|
||||
}
|
||||
|
@@ -43,7 +43,7 @@ class Controller_User_Service extends Controller_TemplateDefault_User {
|
||||
$this->ao->service->find_all(),
|
||||
25,
|
||||
array(
|
||||
'id'=>array('label'=>'ID','url'=>'user/service/view/'),
|
||||
'id'=>array('label'=>'ID','url'=>URL::link('user','service/view/')),
|
||||
'service_name()'=>array('label'=>'Details'),
|
||||
'recur_schedule'=>array('label'=>'Billing'),
|
||||
'price(TRUE,TRUE)'=>array('label'=>'Price','class'=>'right'),
|
||||
@@ -52,7 +52,7 @@ class Controller_User_Service extends Controller_TemplateDefault_User {
|
||||
array(
|
||||
'page'=>TRUE,
|
||||
'type'=>'select',
|
||||
'form'=>'user/service/view',
|
||||
'form'=>URL::link('user','service/view'),
|
||||
)),
|
||||
));
|
||||
}
|
||||
|
@@ -66,7 +66,7 @@ abstract class Model_Service_Plugin extends ORM_OSB {
|
||||
$("button[name=submit]").click(function() {
|
||||
var t=$(this).val().split(":");
|
||||
if (x++) { alert("Session expired, please refresh the page!"); return false; }
|
||||
$.getJSON("'.URL::site('user/service/ajaxmanage/'.$this->service_id).'", { k: "'.$k.'",t: t[1] }, function(data) {
|
||||
$.getJSON("'.URL::link('user','service/ajaxmanage/'.$this->service_id,TRUE).'", { k: "'.$k.'",t: t[1] }, function(data) {
|
||||
$.each(data, function(key, val) { $("#"+key+"_"+t[0]+"_"+t[1]).val(val); });
|
||||
}).error(function() { alert("There was a problem with the request"); return false; }).success(
|
||||
function() { $("form[id=id_"+t[0]+"_"+t[1]+"]").submit(); });
|
||||
|
@@ -26,7 +26,7 @@ Pending change to: <?php echo $so->service_change->list_details(); ?>
|
||||
<?php } ?>
|
||||
<tr class="list-data">
|
||||
<td class="id"><?php echo $iio->id; ?></td>
|
||||
<td><?php echo HTML::anchor('/user/invoice/view/'.$iio->invoice_id,$iio->invoice_id); ?></td>
|
||||
<td><?php echo HTML::anchor(URL::link('user','invoice/view/'.$iio->invoice_id),$iio->invoice_id); ?></td>
|
||||
<td><?php echo $iio->display('product_id'); ?></td>
|
||||
<td><?php echo $iio->display('item_type'); ?></td>
|
||||
<td><?php echo $iio->display('recurring_schedule'); ?></td>
|
||||
|
@@ -69,8 +69,8 @@
|
||||
</tr>
|
||||
<?php $i=0; foreach ($so->invoice->distinct('id')->order_by('id DESC')->find_all() as $io) { ?>
|
||||
<tr class="<?php echo $i++%2 ? 'odd' : 'even'; ?>">
|
||||
<td class="icon" width="20px"><?php echo HTML::anchor('/user/invoice/download/'.$io->id,HTML::image('media/img/gnome-pdf.png',array('alt'=>_('Download'),'width'=>20))); ?></td>
|
||||
<td class="data"><?php echo HTML::anchor('/user/invoice/view/'.$io->id,$io->id()); ?></td>
|
||||
<td class="icon" width="20px"><?php echo HTML::anchor(URL::link('user','invoice/download/'.$io->id),HTML::image('media/img/gnome-pdf.png',array('alt'=>_('Download'),'width'=>20))); ?></td>
|
||||
<td class="data"><?php echo HTML::anchor(URL::link('user','invoice/view/'.$io->id),$io->id()); ?></td>
|
||||
<td class="data"><?php echo $io->display('date_orig'); ?></td>
|
||||
<td class="data"><?php echo $io->display('due_date'); ?></td>
|
||||
<td class="data"><?php echo $io->total(TRUE); ?></td>
|
||||
|
@@ -24,7 +24,7 @@ class Controller_Admin_SSL extends Controller_TemplateDefault_Admin {
|
||||
ORM::factory('SSL_CA')->find_all(),
|
||||
25,
|
||||
array(
|
||||
'id'=>array('label'=>'ID','url'=>'admin/ssl/view/'),
|
||||
'id'=>array('label'=>'ID','url'=>URL::link('admin','ssl/view/')),
|
||||
'sign_cert'=>array('label'=>'Cert'),
|
||||
'issuer()'=>array('label'=>'Issuer'),
|
||||
'valid_to(TRUE)'=>array('label'=>'Expires'),
|
||||
@@ -32,7 +32,7 @@ class Controller_Admin_SSL extends Controller_TemplateDefault_Admin {
|
||||
array(
|
||||
'page'=>TRUE,
|
||||
'type'=>'select',
|
||||
'form'=>'admin/ssl/view',
|
||||
'form'=>URL::link('admin','ssl/view'),
|
||||
)),
|
||||
));
|
||||
}
|
||||
@@ -94,14 +94,14 @@ class Controller_Admin_SSL extends Controller_TemplateDefault_Admin {
|
||||
ORM::factory('SSL_CA',$id)->list_issued(),
|
||||
25,
|
||||
array(
|
||||
'id'=>array('label'=>'ID','url'=>'admin/service/view/'),
|
||||
'id'=>array('label'=>'ID','url'=>URL::link('admin','service/view/')),
|
||||
'plugin()->dn()'=>array('label'=>'Cert'),
|
||||
'plugin()->valid_to(TRUE)'=>array('label'=>'Expires'),
|
||||
),
|
||||
array(
|
||||
'page'=>TRUE,
|
||||
'type'=>'select',
|
||||
'form'=>'admin/service/view',
|
||||
'form'=>URL::link('admin','service/view'),
|
||||
)),
|
||||
));
|
||||
|
||||
|
@@ -30,7 +30,7 @@ class Controller_User_SSL extends Controller_TemplateDefault_User {
|
||||
'body'=>_('Your requested password is too short.'),
|
||||
));
|
||||
|
||||
HTTP::redirect('user/service/view/'.$so->id);
|
||||
HTTP::redirect(URL::link('user','service/view/'.$so->id));
|
||||
}
|
||||
|
||||
if (! $so->loaded() OR ! Auth::instance()->authorised($so->account_id,$so->affiliate_id)) {
|
||||
|
@@ -112,7 +112,7 @@ class Model_Service_Plugin_Ssl extends Model_Service_Plugin {
|
||||
return '';
|
||||
|
||||
// @todo Do some password validation
|
||||
$output = Form::open('user/ssl/download');
|
||||
$output = Form::open(URL::link('user','ssl/download'));
|
||||
$output .= Form::hidden('sid',$this->service->id);
|
||||
$output .= _('Choose a password').': '.Form::password('passwd','').'<br/><br/>';
|
||||
$output .= Form::submit('download','Download',array('class'=>'form_button'));
|
||||
|
@@ -2,7 +2,7 @@
|
||||
<?php if (isset($o['invoice'])) { ?>
|
||||
<td><?php echo $o['invoice']->display('date_orig'); ?></td>
|
||||
<td>Invoice</td>
|
||||
<td><?php echo HTML::anchor('user/invoice/view/'.$o['invoice']->id,$o['invoice']->id()); ?></td>
|
||||
<td><?php echo HTML::anchor(URL::link('user','invoice/view/'.$o['invoice']->id),$o['invoice']->id()); ?></td>
|
||||
<td class="right"><?php echo $o['invoice']->total(TRUE); ?></td>
|
||||
<?php } elseif (isset($o['payment'])) { ?>
|
||||
<td><?php echo $o['payment']->display('date_payment'); ?></td>
|
||||
|
@@ -25,7 +25,7 @@ class Controller_Admin_Task extends Controller_TemplateDefault_Admin {
|
||||
ORM::factory('Task_Log')->order_by('id','DESC')->find_all(),
|
||||
25,
|
||||
array(
|
||||
'id'=>array('label'=>'ID','url'=>'admin/task/view/'),
|
||||
'id'=>array('label'=>'ID','url'=>URL::link('admin','task/view/')),
|
||||
'date_orig'=>array('label'=>'Date'),
|
||||
'task->display("name")'=>array('label'=>'Task'),
|
||||
'result'=>array('label'=>'Result'),
|
||||
|
Reference in New Issue
Block a user