|
|
|
@@ -30,7 +30,30 @@ if (!getperms('D') && !getperms('P'))
|
|
|
|
|
$e_sub_cat = 'banner';
|
|
|
|
|
|
|
|
|
|
e107::lan('banner',false,'front');
|
|
|
|
|
e107::lan('banner',true,true);
|
|
|
|
|
e107::lan('banner',true,true);
|
|
|
|
|
|
|
|
|
|
e107::js('footer-inline','
|
|
|
|
|
|
|
|
|
|
$("#banner-campaign-sel").on("change", function() {
|
|
|
|
|
|
|
|
|
|
vr = $(this).val();
|
|
|
|
|
if(vr == "_new_")
|
|
|
|
|
{
|
|
|
|
|
$("#banner-campaign").show("slow");
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
$("#banner-campaign").hide("slow");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class banner_admin extends e_admin_dispatcher
|
|
|
|
@@ -82,7 +105,7 @@ class banner_ui extends e_admin_ui
|
|
|
|
|
// protected $batchCopy = true;
|
|
|
|
|
// protected $sortField = 'somefield_order';
|
|
|
|
|
// protected $orderStep = 10;
|
|
|
|
|
// protected $tabs = array('General','Advanced'); // Use 'tab'=>0 OR 'tab'=>1 in the $fields below to enable.
|
|
|
|
|
protected $tabs = array(LAN_BASIC, LAN_ADVANCED); // Use 'tab'=>0 OR 'tab'=>1 in the $fields below to enable.
|
|
|
|
|
|
|
|
|
|
// protected $listQry = "SELECT * FROM `#tableName` WHERE field != '' "; // Example Custom Query. LEFT JOINS allowed. Should be without any Order or Limit.
|
|
|
|
|
|
|
|
|
@@ -91,18 +114,20 @@ class banner_ui extends e_admin_ui
|
|
|
|
|
protected $fields = array (
|
|
|
|
|
'checkboxes' => array ( 'title' => '', 'type' => null, 'data' => null, 'width' => '5%', 'thclass' => 'center', 'forced' => '1', 'class' => 'center', 'toggle' => 'e-multiselect', ),
|
|
|
|
|
'banner_id' => array ( 'title' => LAN_ID, 'data' => 'int', 'width' => '2%', 'help' => '', 'readParms' => '', 'writeParms' => '', 'class' => 'left', 'thclass' => 'left', ),
|
|
|
|
|
'banner_campaign' => array ( 'title' => 'Campaign', 'type' => 'method', 'data' => 'str', 'width' => 'auto', 'filter' => true, 'help' => '', 'readParms' => '', 'writeParms' => '', 'class' => 'left', 'thclass' => 'left', ),
|
|
|
|
|
'banner_campaign' => array ( 'title' => 'Campaign', 'type' => 'method', 'data' => 'str', 'width' => 'auto', 'filter' => true, 'help' => '', 'readParms' => '', 'writeParms' => array( 'tdClassRight'=>'form-inline'), 'class' => 'left', 'thclass' => 'left', ),
|
|
|
|
|
|
|
|
|
|
'banner_clientname' => array ( 'title' => 'Clientname', 'type' => 'method', 'data' => 'str', 'width' => 'auto', 'filter' => true, 'help' => '', 'readParms' => '', 'writeParms' => '', 'class' => 'left', 'thclass' => 'left', ),
|
|
|
|
|
'banner_clientlogin' => array ( 'title' => BNRLAN_12, 'type' => 'method', 'data' => 'str', 'width' => 'auto', 'help' => '', 'readParms' => '', 'writeParms' => '', 'class' => 'center', 'thclass' => 'center', ),
|
|
|
|
|
'banner_clientpassword' => array ( 'title' => BNRLAN_13, 'type' => 'text', 'data' => 'str', 'width' => 'auto', 'help' => '', 'readParms' => '', 'writeParms' => 'strength=1&password=1&required=0&generate=1&nomask=1', 'class' => 'center', 'thclass' => 'center', ),
|
|
|
|
|
'banner_clientname' => array ( 'title' => 'Clientname', 'type' => 'method', 'tab'=>1, 'data' => 'str', 'width' => 'auto', 'filter' => true, 'help' => '', 'readParms' => '', 'writeParms' => '', 'class' => 'left', 'thclass' => 'left', ),
|
|
|
|
|
'banner_clientlogin' => array ( 'title' => BNRLAN_12, 'type' => 'method', 'tab'=>1, 'data' => 'str', 'width' => 'auto', 'help' => '', 'readParms' => '', 'writeParms' => '', 'class' => 'center', 'thclass' => 'center', ),
|
|
|
|
|
'banner_clientpassword' => array ( 'title' => BNRLAN_13, 'type' => 'text', 'tab'=>1,'data' => 'str', 'width' => 'auto', 'help' => '', 'readParms' => '', 'writeParms' => 'strength=1&password=1&required=0&generate=1&nomask=1', 'class' => 'center', 'thclass' => 'center', ),
|
|
|
|
|
'banner_image' => array ( 'title' => BNRLAN_14, 'type' => 'image', 'data' => 'str', 'width' => 'auto', 'help' => '', 'readParms' => 'thumb=0x50', 'writeParms' => 'media=banner&w=600', 'class' => 'left', 'thclass' => 'left', ),
|
|
|
|
|
'banner_clickurl' => array ( 'title' => BNRLAN_15, 'type' => 'text', 'data' => 'str', 'width' => 'auto', 'inline' => true, 'help' => '', 'readParms' => '', 'writeParms' => 'size=xxlarge&required=1', 'class' => 'left', 'thclass' => 'left', ),
|
|
|
|
|
'banner_impurchased' => array ( 'title' => BNRLAN_16, 'type' => 'number', 'data' => 'int', 'width' => 'auto', 'inline' => true, 'readParms' => '', 'writeParms' => '', 'class' => 'center', 'thclass' => 'center', 'help'=>'0 = unlimited' ),
|
|
|
|
|
'banner_description' => array ( 'title' => BNRLAN_49, 'type' => 'textarea', 'data' => 'str', 'width' => 'auto', 'filter' => true, 'help' => '', 'readParms' => '', 'writeParms' => '', 'class' => 'center', 'thclass' => 'center', ),
|
|
|
|
|
'banner_tooltip' => array ( 'title' => BNRLAN_49, 'type' => 'text', 'data' => 'str', 'width' => 'auto', 'help' => '', 'readParms' => '', 'writeParms' => array('size'=>'xxlarge'), 'class' => 'center', 'thclass' => 'center', ),
|
|
|
|
|
|
|
|
|
|
'banner_startdate' => array ( 'title' => BNRLAN_17, 'type' => 'datestamp', 'data' => 'int', 'width' => 'auto', 'filter' => true, 'help' => '', 'readParms' => '', 'writeParms' => '', 'class' => 'center', 'thclass' => 'center', ),
|
|
|
|
|
'banner_enddate' => array ( 'title' => BNRLAN_18, 'type' => 'datestamp', 'data' => 'int', 'width' => 'auto', 'filter' => true, 'help' => '', 'readParms' => '', 'writeParms' => '', 'class' => 'center', 'thclass' => 'center', ),
|
|
|
|
|
'banner_description' => array ( 'title' => LAN_DESCRIPTION, 'type' => 'textarea', 'data' => 'str', 'width' => 'auto', 'filter' => true, 'help' => '', 'readParms' => '', 'writeParms' => '', 'class' => 'center', 'thclass' => 'center', ),
|
|
|
|
|
|
|
|
|
|
'banner_startdate' => array ( 'title' => BNRLAN_17, 'type' => 'datestamp', 'tab'=>1,'data' => 'int', 'width' => 'auto', 'filter' => true, 'help' => '', 'readParms' => '', 'writeParms' => '', 'class' => 'center', 'thclass' => 'center', ),
|
|
|
|
|
'banner_enddate' => array ( 'title' => BNRLAN_18, 'type' => 'datestamp', 'tab'=>1, 'data' => 'int', 'width' => 'auto', 'filter' => true, 'help' => '', 'readParms' => '', 'writeParms' => '', 'class' => 'center', 'thclass' => 'center', ),
|
|
|
|
|
'banner_active' => array ( 'title' => LAN_VISIBILITY, 'type' => 'userclass', 'data' => 'int', 'width' => 'auto', 'filter' => true, 'inline' => true, 'help' => '', 'readParms' => '', 'writeParms' => '', 'class' => 'left', 'thclass' => 'left', ),
|
|
|
|
|
'banner_clicks' => array ( 'title' => BANNERLAN_24, 'type' => 'number', 'noedit'=>true, 'readonly'=>2, 'data' => 'int', 'width' => 'auto', 'help' => '', 'readParms' => '', 'writeParms' => '', 'class' => 'center', 'thclass' => 'center', ),
|
|
|
|
|
|
|
|
|
@@ -145,7 +170,7 @@ class banner_ui extends e_admin_ui
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(!empty($new_data['banner_campaign_sel']))
|
|
|
|
|
if(!empty($new_data['banner_campaign_sel']) && $new_data['banner_campaign_sel'] != '_new_')
|
|
|
|
|
{
|
|
|
|
|
$new_data['banner_campaign'] = $new_data['banner_campaign_sel'];
|
|
|
|
|
|
|
|
|
@@ -360,6 +385,10 @@ class banner_form_ui extends e_admin_form_ui
|
|
|
|
|
$sql = e107::getDb();
|
|
|
|
|
if ($sql->select("banner"))
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
$this->campaigns['_new_'] = "(New Campaign)";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
while ($banner_row = $sql->fetch())
|
|
|
|
|
{
|
|
|
|
|
if (strpos($banner_row['banner_campaign'], "^") !== FALSE)
|
|
|
|
@@ -494,11 +523,11 @@ class banner_form_ui extends e_admin_form_ui
|
|
|
|
|
if (count($this->campaigns))
|
|
|
|
|
{
|
|
|
|
|
$text = $frm->select('banner_campaign_sel',$this->campaigns, $curVal,'',LAN_SELECT);
|
|
|
|
|
$text .= $frm->text('banner_campaign','','',array('placeholder'=> 'Or enter a new campaign'));
|
|
|
|
|
$text .= $frm->text('banner_campaign','','',array('size'=>'xlarge', 'class'=>'e-hideme','placeholder'=> 'Enter a campaign name'));
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
$text = $frm->text('banner_campaign',$curVal);
|
|
|
|
|
$text = $frm->text('banner_campaign',$curVal, '', array('size'=>'xlarge', 'placeholder'=> 'Enter a campaign name'));
|
|
|
|
|
}
|
|
|
|
|
return $text; // $frm->text('banner_campaign',$curVal);
|
|
|
|
|
break;
|
|
|
|
|