.
*/
require_once('CF7DBPlugin.php');
require_once('CFDBView.php');
require_once('CFDBShortCodeContentParser.php');
class CFDBViewShortCodeBuilder extends CFDBView {
/**
* @var CF7DBPlugin
*/
var $plugin;
/**
* @var array
*/
var $requestParams;
/**
* @var String URL
*/
var $infoImg;
/**
* @var String URL
*/
var $siteUrl;
/**
* @param $plugin CF7DBPlugin
* @return void
*/
function display(&$plugin) {
$this->plugin = $plugin == null ? $plugin : new CF7DBPlugin;
$this->requestParams = $this->gatherRequestParams();
$this->pageHeader($this->plugin);
$this->siteUrl = get_option('home');
$this->infoImg = $this->plugin->getPluginFileUrl('/img/info.jpg');
$this->outputJavascript();
$this->outputCSS();
$this->outputSectionHeader();
$this->outputTabLayout();
}
public function outputSectionHeader() {
?>
displayShortCodeControl(); ?>
displayExportControl(); ?>
displayFormControl(); ?>
displayColumnControl(); ?>
displayRowControl(); ?>
displayTransformControl(); ?>
displayBeforeAfterControl(); ?>
displayShortCodeSpecificControl(); ?>
displaySecurityControl(); ?>
getRequestParam('form');
$params['postedEnc'] = $this->getRequestParam('enc');
$params['postedSC'] = $this->getRequestParam('sc');
$params['postedTrans'] = $this->getRequestParam('trans');
$params['postedShow'] = $this->getRequestParam('show');
$params['postedHide'] = $this->getRequestParam('hide');
$params['postedRole'] = $this->getRequestParam('role');
$params['postedPermissionmsg'] = $this->getRequestParam('permissionmsg');
$params['postedEdit'] = $this->getRequestParam('edit');
$params['postedSearch'] = $this->getRequestParam('search');
$params['postedFilter'] = $this->getRequestParam('filter');
$params['postedTSearch'] = $this->getRequestParam('tsearch');
$params['postedTFilter'] = $this->getRequestParam('tfilter');
$params['postedLimit'] = $this->getRequestParam('limit');
$params['postedTLimit'] = $this->getRequestParam('tlimit');
$postedLimitComponents = explode(',', $params['postedLimit']);
$params['postedLimitStart'] = '';
$params['postedLimitNumRows'] = '';
switch (count($postedLimitComponents)) {
case 2:
$params['postedLimitStart'] = $postedLimitComponents[0];
$params['postedLimitNumRows'] = $postedLimitComponents[1];
break;
case 1:
$params['postedLimitNumRows'] = $postedLimitComponents[0];
break;
default:
break;
}
$params['postedUnbuffered'] = $this->getRequestParam('unbuffered');
$params['postedRandom'] = $this->getRequestParam('random');
$params['postedOrderby'] = $this->getRequestParam('orderby');
$params['postedTOrderby'] = $this->getRequestParam('torderby');
$params['postedHeader'] = $this->getRequestParam('header');
$params['postedHeaders'] = $this->getRequestParam('headers');
$params['postedItemtitle'] = $this->getRequestParam('itemtitle');
$params['postedId'] = $this->getRequestParam('id');
$params['postedClass'] = $this->getRequestParam('class');
$params['postedStyle'] = $this->getRequestParam('style');
$params['postedEdit'] = $this->getRequestParam('edit');
$params['postedDtOptions'] = $this->getRequestParam('dt_options');
$params['postedEditcolumns'] = $this->getRequestParam('editcolumns');
$params['postedVar'] = $this->getRequestParam('var');
$params['postedFormat'] = $this->getRequestParam('format');
$params['postedFunction'] = $this->getRequestParam('function');
$params['postedDelimiter'] = $this->getRequestParam('delimiter');
$params['postedFilelinks'] = $this->getRequestParam('filelinks');
$params['postedWpautop'] = $this->getRequestParam('wpautop');
$params['postedStripbr'] = $this->getRequestParam('stripbr');
$params['postedContent'] = $this->getRequestParam('content');
$params['postedContentBefore'] = '';
$params['postedContentAfter'] = '';
$postedContentAfter = '';
if ($params['postedContent']) {
$parser = new CFDBShortCodeContentParser;
list($postedContentBefore, $postedContent, $postedContentAfter) = $parser->parseBeforeContentAfter($params['postedContent']);
$params['postedContentBefore'] = $postedContentBefore;
$params['postedContent'] = $postedContent;
$params['postedContentAfter'] = $postedContentAfter;
}
$params['postedUrlonly'] = $this->getRequestParam('urlonly');
$params['postedLinktext'] = $this->getRequestParam('linktext');
return $params;
}
public function displayShortCodeControl() {
?>
user_login : '';
?>
plugin->getSubmitsTableName();
$rows = $wpdb->get_results("select distinct `form_name` from `$tableName` order by `form_name`");
?>