copy කරන් තියෙන එක paste කරල යන්න

Kasippu Sira

Well-known member
  • Dec 1, 2015
    12,824
    1,809
    113
    අම්මගෙ ඔඩොක්කේ
    7anP.gif
     

    Aedes aegypti

    Banned
    Dec 18, 2016
    149
    9
    0
    fasebook twiter hack 12-21-2016 11:04 AM සයිට් එක ලෝඩ් කරලා කලිසම ගලොපන් මොනිටරේ ප&#353
     

    dasss

    Well-known member
  • Jul 30, 2015
    3,131
    119
    63
    මහින්ද රාජපක්ෂ නැවතත් කොළඹට පරාදයි !.
    පසුගියදා එජාප අප පාක්ෂික කිලී මහරාජා මහතාගෙ සිරස නාළිකාවෙන් සංවිධාණය කල සිරස පෙන්ටතලන් තරග මාලාවෙ අවසන් පුර්ව තරග පැවැත්වුනා !.
    ඒ වීරකැටිය රාජපක්ෂ මධ්ය විද්යාලය හා කොළඹ රාජකීය කණ්ඩායම අතරත්
    ගාල්ල මහින්ද විද්යාලය අතර හා කොළඹ මියුසියස් විද්යාලය අතරත්ය.
    එහිදි මහරාජා මහතාගේ සිරස ආයතනය පළමු අවසන් පූර්ව තරගයේදී වීරකැටිය රාජපක්ෂ කණ්ඩායම ජය තහවුරු කර ගත් ප්රශ්නය තරගයෙන් ඉවත් කර තාක්ෂණික ගැටලුවක් නිසා තරගයෙ ජය එක ලකුණකින් රාජකීය විද්යාලයට හිමි කර දුන්නා.
    දෙවන අවසන් පූර්ව තරගයෙ ජය තාක්ෂණික දෝෂයක් නිසා එක ලකුණකින් කොළඹ මියුසියස් විද්යාලයට ලබා දුන්නා.
    මෙහිදි තාක්ෂණික ගැටලු නිසා පරාජය කල මහින්ද හා රාජපක්ෂ පාසල් , මහින්ද රාජපක්ෂ මැදමුලන මෘගයා ජනපතිවරණයෙන් කොළඹ දිස්ත්රීක්කය පරාජය වීම නැවත මතක් කර දුන්නා.
    දකුනෙ පාසල් හමු වේ ගැලවුනු කොළඹ හත මියුසියස් බාලිකාවේ රාජකීය රෙද්ද කෙසේ හෝ නැවත සකසා දුන් සිරසට කොළඹ හත එජාප අපගේ ප්රණාමය හිමි විය යුතුයි.
     

    p.senanayaka

    Junior member
  • May 15, 2014
    51
    5
    8
    /**
    * @property Carrier $object
    */
    class AdminCarrierWizardControllerCore extends AdminController
    {
    protected $wizard_access;

    public function __construct()
    {
    $this->bootstrap = true;
    $this->display = 'view';
    $this->table = 'carrier';
    $this->identifier = 'id_carrier';
    $this->className = 'Carrier';
    $this->lang = false;
    $this->deleted = true;
    $this->step_number = 0;
    $this->type_context = Shop::getContext();
    $this->old_context = Context::getContext();
    $this->multishop_context = Shop::CONTEXT_ALL;
    $this->context = Context::getContext();

    $this->fieldImageSettings = array(
    'name' => 'logo',
    'dir' => 's'
    );

    parent::__construct();

    $this->tabAccess = Profile::getProfileAccess($this->context->employee->id_profile, Tab::getIdFromClassName('AdminCarriers'));
    }

    public function setMedia()
    {
    parent::setMedia();
    $this->addJqueryPlugin('smartWizard');
    $this->addJqueryPlugin('typewatch');
    $this->addJs(_PS_JS_DIR_.'admin/carrier_wizard.js');
    }

    public function initWizard()
    {
    $this->wizard_steps = array(
    'name' => 'carrier_wizard',
    'steps' => array(
    array(
    'title' => $this->l('General settings'),
    ),
    array(
    'title' => $this->l('Shipping locations and costs'),
    ),
    array(
    'title' => $this->l('Size, weight, and group access'),
    ),
    array(
    'title' => $this->l('Summary'),
    ))
    );

    if (Shop::isFeatureActive()) {
    $multistore_step = array(
    array(
    'title' => $this->l('MultiStore'),
    )
    );
    array_splice($this->wizard_steps['steps'], 1, 0, $multistore_step);
    }
    }

    public function renderView()
    {
    $this->initWizard();

    if (Tools::getValue('id_carrier') && $this->tabAccess['edit']) {
    $carrier = $this->loadObject();
    } elseif ($this->tabAccess['add']) {
    $carrier = new Carrier();
    }

    if ((!$this->tabAccess['edit'] && Tools::getValue('id_carrier')) || (!$this->tabAccess['add'] && !Tools::getValue('id_carrier'))) {
    $this->errors[] = Tools::displayError('You do not have permission to use this wizard.');
    return ;
    }

    $currency = $this->getActualCurrency();

    $this->tpl_view_vars = array(
    'currency_sign' => $currency->sign,
    'PS_WEIGHT_UNIT' => Configuration::get('PS_WEIGHT_UNIT'),
    'enableAllSteps' => Validate::isLoadedObject($carrier),
    'wizard_steps' => $this->wizard_steps,
    'validate_url' => $this->context->link->getAdminLink('AdminCarrierWizard'),
    'carrierlist_url' => $this->context->link->getAdminLink('AdminCarriers').'&conf='.((int)Validate::isLoadedObject($carrier) ? 4 : 3),
    'multistore_enable' => Shop::isFeatureActive(),
    'wizard_contents' => array(
    'contents' => array(
    0 => $this->renderStepOne($carrier),
    1 => $this->renderStepThree($carrier),
    2 => $this->renderStepFour($carrier),
    3 => $this->renderStepFive($carrier),
    )
    ),
    'labels' => array('next' => $this->l('Next'), 'previous' => $this->l('Previous'), 'finish' => $this->l('Finish'))
    );


    if (Shop::isFeatureActive()) {
    array_splice($this->tpl_view_vars['wizard_contents']['contents'], 1, 0, array(0 => $this->renderStepTwo($carrier)));
    }

    $this->context->smarty->assign(array(
    'carrier_logo' => (Validate::isLoadedObject($carrier) && file_exists(_PS_SHIP_IMG_DIR_.$carrier->id.'.jpg') ? _THEME_SHIP_DIR_.$carrier->id.'.jpg' : false),
    ));

    $this->context->smarty->assign(array(
    'logo_content' => $this->createTemplate('logo.tpl')->fetch()
    ));

    $this->addjQueryPlugin(array('ajaxfileupload'));

    return parent::renderView();
    }

    public function initBreadcrumbs($tab_id = null, $tabs = null)
    {
    if (Tools::getValue('id_carrier')) {
    $this->display = 'edit';
    } else {
    $this->display = 'add';
    }

    parent::initBreadcrumbs((int)Tab::getIdFromClassName('AdminCarriers'));

    $this->display = 'view';
    }

    public function initPageHeaderToolbar()
    {
    parent::initPageHeaderToolbar();

    $this->page_header_toolbar_btn['cancel'] = array(
    'href' => $this->context->link->getAdminLink('AdminCarriers'),
    'desc' => $this->l('Cancel', null, null, false)
    );
    }

    public function renderStepOne($carrier)
    {
    $this->fields_form = array(
    'form' => array(
    'id_form' => 'step_carrier_general',
    'input' => array(
    array(
    'type' => 'text',
    'label' => $this->l('Carrier name'),
    'name' => 'name',
    'required' => true,
    'hint' => array(
    sprintf($this->l('Allowed characters: letters, spaces and "%s".'), '().-'),
    $this->l('The carrier\'s name will be displayed during checkout.'),
    $this->l('For in-store pickup, enter 0 to replace the carrier name with your shop name.')
    )
    ),
    array(
    'type' => 'text',
    'label' => $this->l('Transit time'),
    'name' => 'delay',
    'lang' => true,
    'required' => true,
    'maxlength' => 128,
    'hint' => $this->l('The estimated delivery time will be displayed during checkout.')
    ),
    array(
    'type' => 'text',
    'label' => $this->l('Speed grade'),
    'name' => 'grade',
    'required' => false,
    'size' => 1,
    'hint' => $this->l('Enter "0" for a longest shipping delay, or "9" for the shortest shipping delay.')
    ),
    array(
    'type' => 'logo',
    'label' => $this->l('Logo'),
    'name' => 'logo'
    ),
    array(
    'type' => 'text',
    'label' => $this->l('Tracking URL'),
    'name' => 'url',
    'hint' => $this->l('Delivery tracking URL: Type \'@\' where the tracking number should appear. It will be automatically replaced by the tracking number.'),
    'desc' => $this->l('For example: \'http://example.com/track.php?num=@\' with \'@\' where the tracking number should appear.')
    )
    )
    )
    );

    $tpl_vars = array('max_image_size' => (int)Configuration::get('PS_PRODUCT_PICTURE_MAX_SIZE') / 1024 / 1024);
    $fields_value = $this->getStepOneFieldsValues($carrier);
    return $this->renderGenericForm(array('form' => $this->fields_form), $fields_value, $tpl_vars);
    }

    public function renderStepTwo($carrier)
    {
    $this->fields_form = array(
    'form' => array(
    'id_form' => 'step_carrier_shops',
    'force' => true,
    'input' => array(
    array(
    'type' => 'shop',
    'label' => $this->l('Shop association'),
    'name' => 'checkBoxShopAsso',
    ),
    )
    )
    );
    $fields_value = $this->getStepTwoFieldsValues($carrier);

    return $this->renderGenericForm(array('form' => $this->fields_form), $fields_value);
    }

    public function renderStepThree($carrier)
    {
    $this->fields_form = array(
    'form' => array(
    'id_form' => 'step_carrier_ranges',
    'input' => array(
    'shipping_handling' => array(
    'type' => 'switch',
    'label' => $this->l('Add handling costs'),
    'name' => 'shipping_handling',
    'required' => false,
    'class' => 't',
    'is_bool' => true,
    'values' => array(
    array(
    'id' => 'shipping_handling_on',
    'value' => 1,
    'label' => $this->l('Enabled')
    ),
    array(
    'id' => 'shipping_handling_off',
    'value' => 0,
    'label' => $this->l('Disabled')
    )
    ),
    'hint' => $this->l('Include the handling costs (as set in Shipping > Preferences) in the final carrier price.')
    ),
    'is_free' => array(
    'type' => 'switch',
    'label' => $this->l('Free shipping'),
    'name' => 'is_free',
    'required' => false,
    'class' => 't',
    'values' => array(
    array(
    'id' => 'is_free_on',
    'value' => 1,
    'label' => '<img src="../img/admin/disabled.gif" alt="'.$this->l('No').'" title="'.$this->l('No').'" />'
    ),
    array(
    'id' => 'is_free_off',
    'value' => 0,
    'label' => '<img src="../img/admin/enabled.gif" alt="'.$this->l('Yes').'" title="'.$this->l('Yes').'" />'
    )
    ),
    ),
    'shipping_method' => array(
    'type' => 'radio',
    'label' => $this->l('Billing'),
    'name' => 'shipping_method',
    'required' => false,
    'class' => 't',
    'br' => true,
    'values' => array(
    array(
    'id' => 'billing_price',
    'value' => Carrier::SHIPPING_METHOD_PRICE,
    'label' => $this->l('According to total price.')
    ),
    array(
    'id' => 'billing_weight',
    'value' => Carrier::SHIPPING_METHOD_WEIGHT,
    'label' => $this->l('According to total weight.')
    )
    )
    ),
    'id_tax_rules_group' => array(
    'type' => 'select',

    }
     

    kanchana071

    Active member
  • Apr 20, 2011
    847
    129
    43
    Gampaha, Sri lanka
    නයා පොලගව ගිලිනව. ඒත් මේ දෙන්නම අද ජීවතුන් අතර නැහැ. මේක අපේ ගෙවල් කිට්ටුව උන සිදුවීමක්
     

    Alaya

    Well-known member
  • Sep 12, 2006
    10,217
    644
    113
    උදලු මිටත් එක්ක බැලුවම ලොකු නයෙක් කියල පේනව