コード例 #1
0
ファイル: DomainstldsForm.php プロジェクト: kokkez/shineisp
 public function init()
 {
     // Set the custom decorator
     $this->addElementPrefixPath('Shineisp_Decorator', 'Shineisp/Decorator/', 'decorator');
     $translate = Shineisp_Registry::get('Zend_Translate');
     $this->addElement('text', 'name', array('filters' => array('StringTrim'), 'required' => true, 'label' => $translate->_('TLD Name'), 'decorators' => array('Bootstrap'), 'class' => 'form-control'));
     $this->addElement('textarea', 'description', array('filters' => array('StringTrim'), 'required' => true, 'label' => $translate->_('Description'), 'decorators' => array('Bootstrap'), 'class' => 'col-lg-12 form-control wysiwyg'));
     $this->addElement('text', 'tags', array('filters' => array('StringTrim'), 'label' => $translate->_('Tags/Type'), 'decorators' => array('Bootstrap'), 'class' => 'form-control'));
     $this->addElement('select', 'ishighlighted', array('label' => $translate->_('Is Highlighted'), 'decorators' => array('Bootstrap'), 'class' => 'form-control', 'multioptions' => array('0' => 'No', '1' => 'Yes')));
     $this->addElement('select', 'isrefundable', array('label' => $translate->_('Is Refundable'), 'decorators' => array('Bootstrap'), 'class' => 'form-control', 'multioptions' => array('0' => 'No', '1' => 'Yes')));
     $this->addElement('text', 'resultcontrol', array('filters' => array('StringTrim'), 'label' => $translate->_('Result String Control'), 'decorators' => array('Bootstrap'), 'class' => 'form-control'));
     $this->addElement('text', 'registration_price', array('filters' => array('StringTrim'), 'required' => true, 'label' => $translate->_('Registration Price'), 'decorators' => array('Bootstrap'), 'class' => 'form-control'));
     $this->addElement('text', 'renewal_price', array('filters' => array('StringTrim'), 'required' => true, 'label' => $translate->_('Renewal Price'), 'decorators' => array('Bootstrap'), 'class' => 'form-control'));
     $this->addElement('text', 'transfer_price', array('filters' => array('StringTrim'), 'required' => true, 'label' => $translate->_('Transfer Price'), 'decorators' => array('Bootstrap'), 'class' => 'form-control'));
     $this->addElement('select', 'server_id', array('decorators' => array('Bootstrap'), 'label' => $translate->_('TLD Server'), 'class' => 'form-control'));
     $this->getElement('server_id')->setAllowEmpty(false)->setRegisterInArrayValidator(false)->setMultiOptions(WhoisServers::getList());
     $this->addElement('select', 'tax_id', array('label' => $translate->_('Tax'), 'decorators' => array('Bootstrap'), 'class' => 'form-control'));
     $this->getElement('tax_id')->setAllowEmpty(false)->setRegisterInArrayValidator(false)->setMultiOptions(Taxes::getList())->setRequired(true);
     $this->addElement('text', 'registration_cost', array('filters' => array('StringTrim'), 'required' => true, 'label' => $translate->_('Registration Cost'), 'decorators' => array('Bootstrap'), 'class' => 'form-control'));
     $this->addElement('text', 'renewal_cost', array('filters' => array('StringTrim'), 'required' => true, 'label' => $translate->_('Renewal Cost'), 'decorators' => array('Bootstrap'), 'class' => 'form-control'));
     $this->addElement('text', 'transfer_cost', array('filters' => array('StringTrim'), 'required' => true, 'label' => $translate->_('Transfer Cost'), 'decorators' => array('Bootstrap'), 'class' => 'form-control'));
     $this->addElement('select', 'registrars_id', array('label' => $translate->_('Registrars'), 'decorators' => array('Bootstrap'), 'class' => 'form-control updatechkdomain'));
     $this->getElement('registrars_id')->setAllowEmpty(false)->setRegisterInArrayValidator(false)->setMultiOptions(Registrars::getList(false))->setRequired(true);
     $this->addElement('submit', 'save', array('required' => false, 'label' => $translate->_('Save'), 'decorators' => array('Bootstrap'), 'class' => 'btn'));
     $this->addElement('hidden', 'tld_id');
 }
コード例 #2
0
ファイル: Registrants.php プロジェクト: kokkez/shineisp
 public function registrars()
 {
     $auth = Zend_Auth::getInstance();
     if ($auth->hasIdentity()) {
         $registrars = Registrars::findActiveRegistrars();
         $this->view->data = $registrars;
         // Path of the template
         return $this->view->render('partials/registrars.phtml');
     }
 }
コード例 #3
0
ファイル: Domains.php プロジェクト: kokkez/shineisp
 /**
  * grid
  * create the configuration of the grid
  */
 public static function grid($rowNum = 10)
 {
     $translator = Shineisp_Registry::getInstance()->Zend_Translate;
     $config['datagrid']['columns'][] = array('label' => null, 'field' => 'd.domain_id', 'alias' => 'domain_id', 'type' => 'selectall');
     $config['datagrid']['columns'][] = array('label' => $translator->translate('ID'), 'field' => 'd.domain_id', 'alias' => 'domain_id', 'sortable' => true, 'searchable' => true, 'type' => 'string');
     $config['datagrid']['columns'][] = array('label' => $translator->translate('Domain'), 'field' => 'd.domain', 'alias' => 'domain', 'sortable' => true, 'searchable' => true, 'type' => 'string');
     $config['datagrid']['columns'][] = array('label' => $translator->translate('TLD'), 'field' => 'ws.tld', 'alias' => 'tld', 'sortable' => true, 'searchable' => true, 'type' => 'string', 'attributes' => array('class' => 'visible-lg visible-md hidden-xs'));
     $config['datagrid']['columns'][] = array('label' => $translator->translate('Renewal'), 'field' => 'd.autorenew', 'alias' => 'autorenew', 'sortable' => true, 'searchable' => true, 'type' => 'boolean', 'attributes' => array('class' => "visible-lg visible-md hidden-xs"));
     $config['datagrid']['columns'][] = array('label' => $translator->translate('Creation date'), 'field' => 'creation_date', 'alias' => 'creation_date', 'sortable' => true, 'searchable' => true, 'type' => 'date', 'attributes' => array('class' => "visible-lg visible-md hidden-xs"));
     $config['datagrid']['columns'][] = array('label' => $translator->translate('Expiry Date'), 'field' => 'expiring_date', 'alias' => 'expiring_date', 'sortable' => true, 'searchable' => true, 'type' => 'date', 'attributes' => array('class' => "visible-lg visible-md hidden-xs"));
     $config['datagrid']['columns'][] = array('label' => $translator->translate('Days left'), 'field' => 'daysleft', 'alias' => 'daysleft', 'sortable' => true, 'type' => 'string', 'attributes' => array('class' => "visible-lg visible-md hidden-xs"));
     $config['datagrid']['columns'][] = array('label' => $translator->translate('Last Name'), 'field' => 'c.lastname', 'alias' => 'lastname', 'sortable' => true, 'searchable' => true, 'type' => 'string', 'attributes' => array('class' => "visible-lg visible-md hidden-xs span1"));
     $config['datagrid']['columns'][] = array('label' => $translator->translate('Registrar'), 'field' => 'r.name', 'alias' => 'registrar', 'sortable' => true, 'searchable' => true, 'type' => 'string', 'attributes' => array('class' => "visible-lg visible-md hidden-xs"));
     $config['datagrid']['columns'][] = array('label' => $translator->translate('Status'), 'field' => 's.status', 'alias' => 'status', 'sortable' => true, 'type' => 'index', 'searchable' => true, 'filterdata' => Statuses::getList('domains'));
     $config['datagrid']['fields'] = "d.domain_id, \r\n\t\t\t\t\t\t\t\t\t\t\tCONCAT(d.domain, '.', ws.tld) as domain, \r\n\t\t\t\t\t\t\t\t\t\t\td.autorenew as autorenew, \r\n\t\t\t\t\t\t\t\t\t\t\tDATE_FORMAT(creation_date, '" . Settings::getMySQLDateFormat('dateformat') . "') as creation_date, \r\n\t\t\t\t\t\t\t\t\t\t\tDATE_FORMAT(expiring_date, '" . Settings::getMySQLDateFormat('dateformat') . "') as expiring_date, \r\n\t\t\t\t\t\t\t\t\t\t\tDATEDIFF(expiring_date, CURRENT_DATE) as daysleft, \r\n\t\t\t\t\t\t\t\t\t\t\tr.name as registrar, \r\n\t\t\t\t\t\t\t\t\t\t\tws.tld as tld, \r\n\t\t\t\t\t\t\t\t\t\t\ts.status as status, \r\n\t\t\t\t\t\t\t\t\t\t\tc.lastname as lastname";
     $dq = Doctrine_Query::create()->select($config['datagrid']['fields'])->from('Domains d')->leftJoin('d.DomainsTlds dt')->leftJoin('dt.WhoisServers ws')->leftJoin('d.TagsConnections tc')->leftJoin('d.Customers c')->leftJoin('d.OrdersItems oi')->leftJoin('d.Registrars r')->leftJoin('d.Statuses s')->orderBy('d.domain')->addWhere("c.isp_id = ?", Isp::getCurrentId());
     $config['datagrid']['dqrecordset'] = $dq;
     $config['datagrid']['rowlist'] = array('10', '50', '100', '1000');
     $config['datagrid']['index'] = "domain_id";
     // Automatic Renewal function
     $massactions['bulk_set_autorenew&status=1'] = "Enable Automatic Renewal";
     $massactions['bulk_set_autorenew&status=0'] = "Disable Automatic Renewal";
     $massactions['bulk_delete'] = 'Mass Delete';
     $massactions['bulk_export'] = 'Export Domain Listing';
     $massactions['bulk_check_dns'] = 'Check DNS Zone';
     $config['datagrid']['massactions']['common'] = $massactions;
     $statuses = Statuses::getList('domains');
     if (!empty($statuses)) {
         $customacts = array();
     }
     foreach ($statuses as $key => $value) {
         $customacts['bulk_set_status&status=' . $key] = "Set as {$value}";
     }
     $config['datagrid']['massactions']['statuses'] = $customacts;
     $actions = Registrars::getActions();
     if (!empty($actions)) {
         $customacts = array();
     }
     foreach ($actions as $registrar => $tasks) {
         foreach ($tasks as $action => $label) {
             $customacts['bulk_registrar_tasks&task=' . $action] = $translator->_('%s registrar task: %s', $registrar, $label);
         }
     }
     $config['datagrid']['massactions']['registrars'] = $customacts;
     return $config;
 }
コード例 #4
0
ファイル: DomainsTasksForm.php プロジェクト: kokkez/shineisp
 public function init()
 {
     // Set the custom decorator
     $this->addElementPrefixPath('Shineisp_Decorator', 'Shineisp/Decorator/', 'decorator');
     $translate = Shineisp_Registry::get('Zend_Translate');
     $this->addElement('text', 'action', array('filters' => array('StringTrim'), 'required' => true, 'decorators' => array('Bootstrap'), 'label' => $translate->_('Action'), 'class' => 'form-control'));
     $this->addElement('text', 'startdate', array('filters' => array('StringTrim'), 'required' => true, 'decorators' => array('Bootstrap'), 'label' => $translate->_('Start'), 'class' => 'form-control'));
     $this->addElement('text', 'enddate', array('filters' => array('StringTrim'), 'decorators' => array('Bootstrap'), 'label' => $translate->_('End'), 'class' => 'form-control'));
     $this->addElement('textarea', 'log', array('filters' => array('StringTrim'), 'decorators' => array('Bootstrap'), 'label' => $translate->_('Log'), 'class' => 'form-control'));
     $this->addElement('select', 'status_id', array('required' => true, 'decorators' => array('Bootstrap'), 'label' => $translate->_('Status'), 'class' => 'form-control'));
     $this->getElement('status_id')->setAllowEmpty(false)->setRegisterInArrayValidator(false)->setMultiOptions(Statuses::getList('domains_tasks'));
     $this->addElement('select', 'domain_id', array('required' => true, 'decorators' => array('Bootstrap'), 'label' => $translate->_('Domain'), 'class' => 'form-control'));
     $this->getElement('domain_id')->setAllowEmpty(false)->setRegisterInArrayValidator(false)->setMultiOptions(Domains::getList());
     $this->addElement('select', 'registrars_id', array('required' => true, 'decorators' => array('Bootstrap'), 'label' => $translate->_('Registrar'), 'class' => 'form-control'));
     $this->getElement('registrars_id')->setAllowEmpty(false)->setRegisterInArrayValidator(false)->setMultiOptions(Registrars::getList());
     $this->addElement('hidden', 'task_id');
 }
コード例 #5
0
ファイル: DomainsForm.php プロジェクト: kokkez/shineisp
 public function init()
 {
     // Set the custom decorator
     $this->addElementPrefixPath('Shineisp_Decorator', 'Shineisp/Decorator/', 'decorator');
     $translate = Shineisp_Registry::get('Zend_Translate');
     $this->addElement('text', 'domain', array('filters' => array('StringTrim'), 'required' => true, 'decorators' => array('Bootstrap'), 'label' => $translate->_('Domain'), 'description' => $translate->_('Write down the name of the domain without any extension, white spaces, or symbols.'), 'class' => 'form-control updatechkdomain'));
     $this->addElement('select', 'tld_id', array('label' => $translate->_('TLD'), 'description' => $translate->_('Select the TLD from the list'), 'decorators' => array('Bootstrap'), 'class' => 'form-control updatechkdomain'));
     $this->getElement('tld_id')->setAllowEmpty(false)->setMultiOptions(DomainsTlds::getList())->setRequired(true);
     $this->addElement('select', 'registrars_id', array('label' => $translate->_('Registrar'), 'decorators' => array('Bootstrap'), 'class' => 'form-control'));
     $this->getElement('registrars_id')->setAllowEmpty(true)->setMultiOptions(Registrars::getList());
     // Domain Ownership
     $this->addElement('select', 'owner', array('label' => $translate->_('Owner'), 'description' => $translate->_("If the domain owner's profile is not set, the domain customer information will be used."), 'decorators' => array('Bootstrap'), 'class' => 'form-control'));
     $this->getElement('owner')->setAllowEmpty(true)->setMultiOptions(DomainsProfiles::getList(true));
     $this->addElement('select', 'admin', array('label' => $translate->_('Admin-C'), 'decorators' => array('Bootstrap'), 'class' => 'form-control'));
     $this->getElement('admin')->setAllowEmpty(true)->setMultiOptions(DomainsProfiles::getList(true));
     $this->addElement('select', 'tech', array('label' => $translate->_('Tech'), 'decorators' => array('Bootstrap'), 'class' => 'form-control'));
     $this->getElement('tech')->setAllowEmpty(true)->setMultiOptions(DomainsProfiles::getList(true));
     $this->addElement('select', 'billing', array('label' => $translate->_('Billing'), 'decorators' => array('Bootstrap'), 'class' => 'form-control'));
     $this->getElement('billing')->setAllowEmpty(true)->setMultiOptions(DomainsProfiles::getList(true));
     $this->addElement('text', 'creation_date', array('filters' => array('StringTrim'), 'label' => $translate->_('Creation date'), 'decorators' => array('Bootstrap'), 'class' => 'form-control date', 'dateformat' => Settings::getJsDateFormat()));
     $this->addElement('text', 'expiring_date', array('filters' => array('StringTrim'), 'label' => $translate->_('Expiry Date'), 'decorators' => array('Bootstrap'), 'class' => 'form-control date', 'dateformat' => Settings::getJsDateFormat()));
     $this->addElement('text', 'authinfocode', array('filters' => array('StringTrim'), 'label' => $translate->_('AUTHINFO CODE'), 'description' => $translate->_('Write down the Authinfo code in order to transfer the domain to this ISP'), 'decorators' => array('Bootstrap'), 'class' => 'form-control'));
     $this->addElement('checkbox', 'autorenew', array('filters' => array('StringTrim'), 'decorators' => array('Bootstrap'), 'label' => $translate->_('Auto renewal'), 'class' => 'form-control'));
     $this->addElement('select', 'customer_id', array('label' => $translate->_('Customer'), 'decorators' => array('Bootstrap'), 'class' => 'form-control'));
     $this->getElement('customer_id')->setAllowEmpty(false)->setMultiOptions(Customers::getList())->setRequired(true);
     //
     $note = $this->addElement('textarea', 'note', array('filters' => array('StringTrim'), 'decorators' => array('Bootstrap'), 'label' => $translate->_('Private Notes'), 'class' => 'col-lg-12 form-control'));
     $note = $this->addElement('textarea', 'message', array('filters' => array('StringTrim'), 'required' => false, 'decorators' => array('Bootstrap'), 'label' => $translate->_('Message'), 'class' => 'col-lg-12 form-control wysiwyg'));
     $status = $this->addElement('select', 'status_id', array('label' => 'Status', 'required' => true, 'decorators' => array('Bootstrap'), 'class' => 'form-control'));
     // DNS SECTION
     // ==============
     $this->addElement('text', 'subdomain', array('filters' => array('StringTrim'), 'decorators' => array('Bootstrap'), 'label' => $translate->_('Subdomain'), 'class' => 'form-control'));
     $this->addElement('text', 'target', array('filters' => array('StringTrim'), 'decorators' => array('Bootstrap'), 'label' => $translate->_('Target'), 'class' => 'form-control'));
     $this->addElement('select', 'zone', array('label' => $translate->_('Zone'), 'decorators' => array('Bootstrap'), 'class' => 'form-control'));
     $this->getElement('zone')->setAllowEmpty(false)->setMultiOptions(Dns_Zones_Types::getZones());
     $status = $this->getElement('status_id')->setAllowEmpty(false)->setMultiOptions(Statuses::getList('domains'));
     $save = $this->addElement('submit', 'save', array('required' => false, 'label' => $translate->_('Save'), 'decorators' => array('Bootstrap'), 'class' => 'btn'));
     $id = $this->addElement('hidden', 'domain_id');
 }
コード例 #6
0
ファイル: delreg.php プロジェクト: bizonix/DomainAgent
<?php

require_once __DIR__ . '/includes/includes.php';
if (empty($_SESSION['user'])) {
    header("Location: login.php");
    die("Redirecting to login.php");
}
$d = new Domains();
$r = new Registrars();
// check if we're deleting a registrar
if (isset($_GET['id']) && $_GET['id'] != '') {
    if (isset($_POST['action']) && $_POST['action'] == 'delete') {
        $confirmed = true;
    } else {
        $confirmed = false;
    }
    $id = $_GET['id'];
} else {
    $id = -1;
}
pageHead();
?>
<body>
<?php 
headerHere('Delete', 'Make sure you know what you are doing');
?>
    <div class="container" style="margin-top: 30px;">
        <div class="row">
            <div class="span3">
                <ul class="nav nav-tabs nav-stacked sidebar">
                    <li class=""><a href="index.php"><i class="icon-home"></i> Home</a></li>
コード例 #7
0
ファイル: DomainsTasks.php プロジェクト: kokkez/shineisp
 public static function AddTask($domain, $action)
 {
     $task = new DomainsTasks();
     $task->startdate = date('Y-m-d H:i:s');
     $task->action = $action;
     $task->domain_id = Domains::getDomainIDbyName($domain);
     $task->registrars_id = Registrars::findRegistrarIDbyDomain($domain);
     $task->status_id = Statuses::id('active', 'domains_tasks');
     //Domains Task Status;
     return $task->trySave();
 }
コード例 #8
0
ファイル: registrar.php プロジェクト: bizonix/DomainAgent
<?php

require_once __DIR__ . '/includes/includes.php';
if (empty($_SESSION['user'])) {
    header("Location: login.php");
    die("Redirecting to login.php");
}
$d = new Domains();
$r = new Registrars();
if (isset($_GET['id']) && $_GET['id'] != '') {
    $id = $_GET['id'];
} else {
    $id = -1;
}
pageHead();
?>
<body>
<?php 
headerHere('Registrars', 'Here you can oversee the registrars, edit their details or add a new one');
?>
    <div class="container top30">
        <div class="row">
            <div class="span3">
                <ul class="nav nav-tabs nav-stacked sidebar">
                    <li class=""><a href="index.php"><i class="icon-home"></i> Home</a></li>
                    <li class=""><a href="domains.php"><i class="icon-briefcase"></i> Domains<span class="badge badge-info"><?php 
echo $d->numTotal();
?>
</span></a></li>
                    <li class="active"><a href="registrars.php"><i class="icon-folder-open"></i> Registrars<span class="badge badge-info"><?php 
echo $r->getTotal();
コード例 #9
0
ファイル: domains.php プロジェクト: bizonix/DomainAgent
<?php

require_once __DIR__ . '/includes/includes.php';
if (empty($_SESSION['user'])) {
    header("Location: login.php");
    die("Redirecting to login.php");
}
$d = new Domains();
$r = new Registrars();
$domains = $d->fetchAll();
$good = $d->fetchGood();
$expiring = $d->fetchExpiring();
$expired = $d->fetchExpired();
pageHead('Domains');
?>
<body>
    <?php 
headerHere('Domains', 'Here you can browse all your domains and see if they require attention');
?>
    <div class="container top30">
        <div class="row">
            <div class="span3">
                <ul class="nav nav-tabs nav-stacked sidebar">
                    <li class=""><a href="index.php"><i class="icon-home"></i> Home</a></li>
                    <li class="active"><a href="domains.php"><i class="icon-briefcase"></i> Domains<span class="badge badge-info"><?php 
echo $d->numTotal();
?>
</span></a></li>
                    <li class=""><a href="registrars.php"><i class="icon-folder-open"></i> Registrars<span class="badge badge-info"><?php 
echo $r->getTotal();
?>
コード例 #10
0
ファイル: Registrars.php プロジェクト: kokkez/shineisp
 /**
  * Save the registrar configuration record 
  * 
  * @param posted var from the form
  * @return Boolean
  */
 public static function saveData($record, $id = null)
 {
     $config = "";
     // Set the new values
     if (is_numeric($id)) {
         $registrar = self::getbyId($id);
     } else {
         $registrar = new Registrars();
     }
     if (!empty($record['settings'])) {
         $config = json_encode($record['settings']);
     }
     if (!empty($record['name'])) {
         $registrar->name = $record['name'];
         $registrar->class = "Shineisp_Plugins_Registrars_" . $record['name'] . "_Main";
         $registrar->config = !empty($config) ? $config : null;
         $registrar->lastupdate = date('Y-m-d H:i:s');
         $registrar->isp_id = Shineisp_Registry::get('ISP')->isp_id;
         $registrar->active = !empty($record['active']) ? $record['active'] : false;
         if ($registrar->trySave()) {
             return $registrar->registrars_id;
         }
     }
     return false;
 }
コード例 #11
0
 /**
  * processAction
  * Update the record previously selected
  * @return unknown_type
  */
 public function processAction()
 {
     $redirector = Zend_Controller_Action_HelperBroker::getStaticHelper('redirector');
     $form = $this->getForm("/admin/registrars/process");
     $request = $this->getRequest();
     // Create the buttons in the edit form
     $this->view->buttons = array(array("url" => "#", "label" => $this->translator->translate('Save'), "params" => array('css' => null, 'id' => 'submit')), array("url" => "/admin/banks/list", "label" => $this->translator->translate('List'), "params" => array('css' => null, 'id' => 'submit')), array("url" => "/admin/banks/new/", "label" => $this->translator->translate('New'), "params" => array('css' => null)));
     // Check if we have a POST request
     if (!$request->isPost()) {
         return $this->_helper->redirector('list', 'registrars', 'admin');
     }
     // Create the registrar custom form
     list($form, $config) = Admin_Form_RegistrarsForm::createRegistrarForm($form, $request->getParam('name'));
     if ($form->isValid($request->getPost())) {
         $params = $form->getValues();
         // Save the data and get the registrar id
         $id = Registrars::saveData($params, $params['registrars_id']);
         if (is_numeric($id)) {
             $this->_helper->redirector('edit', 'registrars', 'admin', array('id' => $id, 'mex' => $this->translator->translate("The task requested has been executed successfully."), 'status' => 'success'));
         } else {
             $redirector->gotoUrl("/admin/registrars/list/");
         }
     } else {
         $this->view->form = $form;
         $this->view->title = $this->translator->translate("Registrar");
         $this->view->description = $this->translator->translate("Here you can fix the registrar parameters.");
         return $this->render('applicantform');
     }
 }
コード例 #12
0
ファイル: delete.php プロジェクト: bizonix/DomainAgent
<?php

require_once __DIR__ . '/includes/includes.php';
if (empty($_SESSION['user'])) {
    header("Location: login.php");
    die("Redirecting to login.php");
}
$d = new Domains();
$r = new Registrars();
// check if we're deleting a domain
if (isset($_GET['id']) && $_GET['id'] != '') {
    if (isset($_POST['action']) && $_POST['action'] == 'delete') {
        $confirmed = true;
    } else {
        $confirmed = false;
    }
    $id = $_GET['id'];
} else {
    $id = -1;
}
pageHead();
?>
<body>
<?php 
headerHere('Delete', 'Make sure you know what you are doing');
?>
    <div class="container top30">
        <div class="row">
            <div class="span3">
                <ul class="nav nav-tabs nav-stacked sidebar">
                    <li class=""><a href="index.php"><i class="icon-home"></i> Home</a></li>
コード例 #13
0
ファイル: TasksController.php プロジェクト: kokkez/shineisp
 private function doDomainTask($task)
 {
     if (!isset($task['Domains']) || !isset($task['Domains']['Customers']) || !isset($task['Domains']['Customers']['customer_id'])) {
         PanelsActions::UpdateTaskLog($task['action_id'], $this->translations->translate('customer_id not found'));
     }
     $customer_id = intval($task['Domains']['Customers']['customer_id']);
     $ISP = Isp::getByCustomerId($customer_id);
     if (!$ISP || !isset($ISP['isp_id']) || !is_numeric($ISP['isp_id'])) {
         PanelsActions::UpdateTaskLog($task['action_id'], $this->translations->translate('isp_id not found'));
         return false;
     }
     try {
         // Getting domains details
         $domain = Domains::find($task['domain_id'], null, true);
         if (!empty($domain[0])) {
             $domain_name = $domain[0]['domain'] . "." . $domain[0]['tld'];
             // Get the associated registrar for the domain selected
             $registrar = Registrars::getRegistrarId($task['registrars_id']);
             if (!empty($registrar['class'])) {
                 // Create the class registrar object
                 $class = $registrar['class'];
                 $regclass = new $class();
                 $action = $task['action'];
                 // Check if the task is REGISTER or TRANSFER the domain name
                 if ($action == "registerDomain") {
                     $regclass->registerDomain($task['domain_id']);
                     // Set the DNS ZONES
                     DomainsTasks::AddTask($domain_name, "setDomainHosts");
                     // Update the domain information
                     DomainsTasks::AddTask($domain_name, "updateDomain");
                 } elseif ($action == "transferDomain") {
                     $regclass->transferDomain($task['domain_id']);
                 } elseif ($action == "renewDomain") {
                     $regclass->renewDomain($task['domain_id']);
                     // Update the domain information
                     DomainsTasks::AddTask($domain_name, "updateDomain");
                 } elseif ($action == "lockDomain") {
                     $regclass->lockDomain($task['domain_id']);
                 } elseif ($action == "unlockDomain") {
                     $regclass->unlockDomain($task['domain_id']);
                     // Update the domain information
                     DomainsTasks::AddTask($domain_name, "updateDomain");
                 } elseif ($action == "setNameServers") {
                     $regclass->setNameServers($task['domain_id']);
                 } elseif ($action == "setDomainHosts") {
                     $regclass->setDomainHosts($task['domain_id']);
                 } else {
                     $regclass->{$action}($task['domain_id']);
                 }
                 // Update the log description of the task
                 DomainsTasks::UpdateTaskLog($task['task_id'], $this->translations->translate("Your request has been executed."));
                 // Update the status of the task
                 DomainsTasks::UpdateTaskStatus($task['task_id'], Statuses::id('complete', 'domains_tasks'));
                 // Set the task as "Complete"
                 // Increment the task counter number
                 DomainsTasks::UpdateTaskCounter($task['task_id']);
                 // Set the status as Active
                 Domains::setStatus($task['domain_id'], Statuses::id('active', 'domains_tasks'));
             }
         }
     } catch (Exception $e) {
         DomainsTasks::UpdateTaskLog($task['task_id'], $this->translations->translate($e->getMessage()));
         Shineisp_Commons_Utilities::SendEmail($ISP['email'], $ISP['email'], null, "Task error message: " . $task['Domains']['domain'] . "." . $task['Domains']['tld'], $e->getMessage());
         Shineisp_Commons_Utilities::logs("Task error message: " . $task['Domains']['domain'] . "." . $task['Domains']['tld'] . ":" . $e->getMessage(), "tasks.log");
     }
     return true;
 }
コード例 #14
0
ファイル: single.php プロジェクト: bizonix/DomainAgent
<?php

require_once __DIR__ . '/includes/includes.php';
if (empty($_SESSION['user'])) {
    header("Location: login.php");
    die("Redirecting to login.php");
}
$d = new Domains();
$r = new Registrars();
// let's see if there's id in the url
if (isset($_GET['id']) && $_GET['id'] != '') {
    $id = $_GET['id'];
} else {
    // we will set it to -1 so we can indicate error later
    $id = -1;
}
// now let's see if this is an update
if (isset($_POST['action']) && $_POST['action'] == 'update') {
    // yes! an update
    $domain['dom_id'] = $_POST['dom_id'];
    $domain['dom_name'] = $_POST['dom_name'];
    $domain['dom_reg_id'] = $_POST['dom_reg_id'];
    $domain['dom_reg_date'] = $_POST['dom_reg_date'];
    $domain['dom_exp_date'] = $_POST['dom_exp_date'];
    $domain['dom_comment'] = $_POST['dom_comment'];
    // let's trigger a value so we can print result later on
    if ($d->update($domain)) {
        $updated = true;
    } else {
        $updated = false;
    }
コード例 #15
0
ファイル: registrars.php プロジェクト: bizonix/DomainAgent
<?php

require_once __DIR__ . '/includes/includes.php';
if (empty($_SESSION['user'])) {
    header("Location: login.php");
    die("Redirecting to login.php");
}
$d = new Domains();
$r = new Registrars();
pageHead();
?>
<body>
    <?php 
headerHere();
?>
    <div class="container top30">
        <div class="row">
            <div class="span3">
                <ul class="nav nav-tabs nav-stacked sidebar">
                    <li class=""><a href="index.php"><i class="icon-home"></i> Home</a></li>
                    <li class=""><a href="domains.php"><i class="icon-briefcase"></i> Domains<span class="badge badge-info"><?php 
echo $d->numTotal();
?>
</span></a></li>
                    <li class="active"><a href="registrars.php"><i class="icon-folder-open"></i> Registrars<span class="badge badge-info"><?php 
echo $r->getTotal();
?>
</span></a></li>
                    <li class="divider"></li>
                    <li class=""><a href="settings.php"><i class="icon-wrench"></i> Settings</a></li>
                    <li class=""><a href="new.php"><i class="icon-plus-sign"></i> Add new</a></li>
コード例 #16
0
ファイル: DomainsController.php プロジェクト: kokkez/shineisp
 /**
  * editAction
  * Get a record and populate the application form 
  * @return unknown_type
  */
 public function editAction()
 {
     $form = $this->getForm('/admin/domains/process');
     $this->view->title = $this->translator->translate("Domain Edit");
     $this->view->description = $this->translator->translate("Here you can edit your own domain parameters.");
     $id = $this->getRequest()->getParam('id');
     if (!empty($id) && is_numeric($id)) {
         // Create the buttons in the edit form
         $this->view->buttons = array(array("url" => "#", "label" => $this->translator->translate('Save'), "params" => array('css' => null, 'id' => 'submit')), array("url" => "/admin/domains/confirm/id/{$id}", "label" => $this->translator->translate('Delete'), "params" => array('css' => null)), array("url" => "/admin/domains/list", "label" => $this->translator->translate('List'), "params" => array('css' => null)), array("url" => "/admin/domains/new/", "label" => $this->translator->translate('New'), "params" => array('css' => null)), array("url" => "/admin/domains/newevent/id/{$id}", "label" => $this->translator->translate('Calendar Event'), "params" => array('css' => null)));
         try {
             $rs = $this->domains->find($id, null);
             if (!empty($rs[0])) {
                 $rs[0]['creation_date'] = Shineisp_Commons_Utilities::formatDateOut($rs[0]['creation_date']);
                 $rs[0]['expiring_date'] = Shineisp_Commons_Utilities::formatDateOut($rs[0]['expiring_date']);
                 $rs[0]['status_id'] = $rs[0]['Statuses']['status_id'];
                 // Domains NicHandles
                 $rs[0]['owner'] = DomainsNichandle::getProfile($id);
                 $rs[0]['admin'] = DomainsNichandle::getProfile($id, "admin");
                 $rs[0]['tech'] = DomainsNichandle::getProfile($id, "tech");
                 $rs[0]['billing'] = DomainsNichandle::getProfile($id, "billing");
                 $form->populate($rs[0]);
                 if (!empty($rs[0]['DomainsTlds']['WhoisServers'])) {
                     $this->view->title = $rs[0]['domain'] . "." . $rs[0]['DomainsTlds']['WhoisServers']['tld'];
                     $this->view->titlelink = "http://" . $rs[0]['domain'] . "." . $rs[0]['DomainsTlds']['WhoisServers']['tld'];
                     $this->view->icon = "fa fa-globe";
                 }
                 $this->view->owner_datagrid = domains::ownerGrid($id);
                 $this->view->actions = Registrars::getActions($rs[0]['registrars_id']);
             }
         } catch (Exception $e) {
             die($e->getMessage());
         }
         $this->view->id = $id;
         // Get all the messages attached to the domain
         $this->view->messages = Messages::getbyDomainId($id);
     }
     $this->view->mex = $this->getRequest()->getParam('mex');
     $this->view->mexstatus = $this->getRequest()->getParam('status');
     $this->view->dns_datagrid = Domains::dnsGrid();
     $this->view->form = $form;
     $this->view->services_datagrid = array('records' => domains::Services($id), 'edit' => array('controller' => 'services', 'action' => 'edit'));
     $this->view->orders_datagrid = array('records' => domains::Orders($id), 'edit' => array('controller' => 'orders', 'action' => 'edit'));
     $this->render('applicantform');
 }
コード例 #17
0
 /**
  * checkdomainAction
  * Check domains availability
  * @return json string
  */
 public function checkdomainAction()
 {
     try {
         $config = Registrars::findActiveRegistrars();
         $domain = $this->getRequest()->getParam('fulldomain');
         if (isset($config[0])) {
             $registrar_class = $config[0]['class'];
             $reg = new $registrar_class();
             $reg->setConfig($config);
             $check = $reg->domainCheck($domain);
             echo json_encode($check);
         }
     } catch (Exception $e) {
         echo json_encode($e->getMessage());
     }
     die;
 }
コード例 #18
0
ファイル: newreg.php プロジェクト: bizonix/DomainAgent
<?php

require_once __DIR__ . '/includes/includes.php';
if (empty($_SESSION['user'])) {
    header("Location: login.php");
    die("Redirecting to login.php");
}
$d = new Domains();
$r = new Registrars();
if (isset($_POST['action']) && $_POST['action'] == 'new') {
    $error = '';
    if (empty($_POST['reg_name'])) {
        $error = '<li>Registrar name</li>';
    }
    if (empty($_POST['reg_link'])) {
        $error = $error . '<li>Link to the website</li>';
    }
    if ($error == '') {
        $registrar['reg_name'] = $_POST['reg_name'];
        $registrar['reg_link'] = $_POST['reg_link'];
        if (!empty($_POST['reg_comment'])) {
            $registrar['reg_comment'] = $_POST['reg_comment'];
        } else {
            $registrar['reg_comment'] = '';
        }
        $r->insert($registrar);
    }
}
pageHead();
?>
<body>
コード例 #19
0
ファイル: Main.php プロジェクト: kokkez/shineisp
 /**
  * Connect into the remote Ascio webservice 
  * 
  * Executes the 'login' command on Ascio's servers, to retrive the session variable
  * for execute the commands.
  * 
  * @return     string       Session variable
  * @access     private
  */
 private function Connect()
 {
     $registrar = Registrars::getActiveRegistrarbyClass(__CLASS__);
     try {
         if (!empty($registrar['config'])) {
             if (empty($registrar['ascio_soapuri'])) {
                 throw new Exception('Warning: Ascio Soap URI has been not set');
             }
             if (empty($registrar['ascio_username'])) {
                 throw new Exception('Warning: Ascio Username has been not set');
             }
             if (empty($registrar['ascio_password'])) {
                 throw new Exception('Warning: Ascio Password has been not set');
             }
             if (!empty($registrar)) {
                 $soap = new SoapClient($registrar['ascio_soapuri']);
                 $this->session['id'] = $soap->login($registrar['ascio_username'], $registrar['ascio_password'], "en", false);
                 return $soap;
             }
         }
     } catch (Exception $e) {
         throw new Exception($e->getMessage());
     }
 }
コード例 #20
0
ファイル: Main.php プロジェクト: kokkez/shineisp
 /**
  * Connect into the remote OVH webservice 
  * 
  * Executes the 'login' command on OVH's servers, to retrive the session variable
  * for execute the commands.
  * 
  * @return     string       Session variable
  * @access     private
  */
 private function Connect()
 {
     $registrar = Registrars::getActiveRegistrarbyClass(__CLASS__);
     try {
         if (!empty($registrar['config'])) {
             if (empty($registrar['ovh_soapuri'])) {
                 throw new Exception('Warning: OVH Soap URI has been not set');
             }
             if (empty($registrar['ovh_username'])) {
                 throw new Exception('Warning: OVH Username has been not set');
             }
             if (empty($registrar['ovh_password'])) {
                 throw new Exception('Warning: OVH Password has been not set');
             }
             if (!empty($registrar)) {
                 $opts = array('http' => array('user_agent' => 'PHPSoapClient'));
                 $context = stream_context_create($opts);
                 $soap = new SoapClient($registrar['ovh_soapuri'], array('stream_context' => $context, 'cache_wsdl' => WSDL_CACHE_NONE));
                 $this->session['id'] = $soap->login($registrar['ovh_username'], $registrar['ovh_password'], "en", false);
                 return $soap;
             }
         }
     } catch (Exception $e) {
         throw new Exception($e->getMessage());
     }
 }