Ejemplo n.º 1
0
function insertPanel() {
    global $_LANG;
    $p_html = cmsCore::callEvent('REPLACE_PANEL', array('html' => ''));

    if ($p_html['html']) { return $p_html['html']; }

    $inCore=cmsCore::getInstance();

    $submit_btn = '<input type="button" class="btn btn-default" style="width:100px" value="'. $_LANG['AD_INSERT'] .'" onClick="insertTag(document.addform.ins.options[document.addform.ins.selectedIndex].value)">';

echo '<table border="0" class="table" style="margin:0;"><tr><td style="border:0;">';
	echo '<table border="0" class="table" style="margin:0;">';
	echo '<tr>';
		echo '<td width="120">';
			echo '<label>'. $_LANG['AD_INSERT'] .':</label> ';
		echo '</td>';
		echo '<td width="">';
			echo '<select id="ins" style="width:99%" class="form-control" name="ins" onChange="showIns()">
					<option value="frm" selected="selected">'.$_LANG['AD_FORM'].'</option>
					<option value="include">'.$_LANG['FILE'].'</option>
					<option value="filelink">'.$_LANG['AD_LINK_DOWNLOAD_FILE'].'</option>';
                    if ($inCore->isComponentInstalled('banners')) {
                        echo '<option value="banpos">'. $_LANG['AD_BANNER_POSITION'] .'</option>';
                    }
		    echo   '<option value="pagebreak">-- '. $_LANG['AD_PAGEBREAK'] .' --</option>
					<option value="pagetitle">-- '. $_LANG['AD_PAGETITLE'] .' --</option>
				  </select>';
		echo '</td>';
        echo '<td width="100">&nbsp;</td>';
	echo '</tr>';
	echo '<tr id="frm">';
		echo '<td width="120">
                    <label>'. $_LANG['AD_FORM'] .':</label>
              </td>';
        echo '<td>
                    <select class="form-control" style="width:99%" name="fm">'. $inCore->getListItems('cms_forms') .'</select>
              </td>';
        echo '<td width="100">'. $submit_btn .'</td>';
    echo '</tr>';
	echo '<tr id="include">';
		echo '<td width="120">
                    <label>'. $_LANG['FILE'] .':</label>
              </td>';
        echo '<td style="vertical-align: middle;">
                    /includes/myphp/<input type="text" class="form-control" style="width:300px;display:inline-block;" name="i" value="myscript.php" />
              </td>';
        echo '<td width="100">'. $submit_btn .'</td>';
    echo '</tr>';
	echo '<tr id="filelink">';
		echo '<td width="120">
                    <label>'. $_LANG['FILE'] .':</label>
              </td>';
        echo '<td>
                    <input type="text" class="form-control" name="fl" value="/files/myfile.rar" />
              </td>';
        echo '<td width="100">'. $submit_btn .'</td>';
    echo '</tr>';
    if ($inCore->isComponentInstalled('banners')){
        $inCore->loadModel('banners');
        echo '<tr id="banpos">';
            echo '<td width="120">
                        <label>'. $_LANG['AD_POSITION'] .':</label>
                  </td>';
            echo '<td>
                        <select class="form-control" style="width:99%" name="ban">'. cms_model_banners::getBannersListHTML() .'</select>
                  </td>';
            echo '<td width="100">'. $submit_btn .'</td>';
        echo '</tr>';
    }
	echo '<tr id="pagebreak">';
		echo '<td width="120">
                    <label>'. $_LANG['TAG'] .':</label>
              </td>';
        echo '<td>
                    {pagebreak}
              </td>';
        echo '<td width="100">'. $submit_btn .'</td>';
    echo '</tr>';
	echo '<tr id="pagetitle">';
		echo '<td width="120">
                    <label>'. $_LANG['AD_TITLE'] .':</label>
              </td>';
        echo '<td>
                    <input type="text" class="form-control" style="width:99%" name="ptitle" />
              </td>';
        echo '<td width="100">'. $submit_btn .'</td>';
    echo '</tr>';


	echo '</table>';

   echo '</td></tr></table>';

   echo '<script type="text/javascript">showIns();</script>';

}
Ejemplo n.º 2
0
Archivo: cp.php Proyecto: deltas1/icms1
function insertPanel()
{
    global $_LANG;
    $p_html = cmsCore::callEvent('REPLACE_PANEL', array('html' => ''));
    if ($p_html['html']) {
        return $p_html['html'];
    }
    $inCore = cmsCore::getInstance();
    $submit_btn = '<input type="button" value="' . $_LANG['AD_INSERT'] . '" style="width:100px" onClick="insertTag(document.addform.ins.options[document.addform.ins.selectedIndex].value)">';
    echo '<table width="100%" border="0" cellspacing="0" cellpadding="8" class="proptable"><tr><td>';
    echo '<table width="100%" border="0" cellspacing="0" cellpadding="2">';
    echo '<tr>';
    echo '<td width="120">';
    echo '<strong>' . $_LANG['AD_INSERT'] . ':</strong> ';
    echo '</td>';
    echo '<td width="">';
    echo '<select name="ins" id="ins" style="width:99%" onChange="showIns()">
					<option value="frm" selected="selected">' . $_LANG['AD_FORM'] . '</option>
					<option value="include">' . $_LANG['FILE'] . '</option>
					<option value="filelink">' . $_LANG['AD_LINK_DOWNLOAD_FILE'] . '</option>';
    if ($inCore->isComponentInstalled('banners')) {
        echo '<option value="banpos">' . $_LANG['AD_BANNER_POSITION'] . '</option>';
    }
    echo '<option value="pagebreak">-- ' . $_LANG['AD_PAGEBREAK'] . ' --</option>
					<option value="pagetitle">-- ' . $_LANG['AD_PAGETITLE'] . ' --</option>
				  </select>';
    echo '</td>';
    echo '<td width="100">&nbsp;</td>';
    echo '</tr>';
    echo '<tr id="frm">';
    echo '<td width="120">
                    <strong>' . $_LANG['AD_FORM'] . ':</strong>
              </td>';
    echo '<td>
                    <select name="fm" style="width:99%">' . $inCore->getListItems('cms_forms') . '</select>
              </td>';
    echo '<td width="100">' . $submit_btn . '</td>';
    echo '</tr>';
    echo '<tr id="include">';
    echo '<td width="120">
                    <strong>' . $_LANG['FILE'] . ':</strong>
              </td>';
    echo '<td>
                    /includes/myphp/<input name="i" type="text" value="myscript.php" />
              </td>';
    echo '<td width="100">' . $submit_btn . '</td>';
    echo '</tr>';
    echo '<tr id="filelink">';
    echo '<td width="120">
                    <strong>' . $_LANG['FILE'] . ':</strong>
              </td>';
    echo '<td>
                    <input name="fl" type="text" value="/files/myfile.rar" />
              </td>';
    echo '<td width="100">' . $submit_btn . '</td>';
    echo '</tr>';
    if ($inCore->isComponentInstalled('banners')) {
        $inCore->loadModel('banners');
        echo '<tr id="banpos">';
        echo '<td width="120">
                        <strong>' . $_LANG['AD_POSITION'] . ':</strong>
                  </td>';
        echo '<td>
                        <select name="ban" style="width:99%">' . cms_model_banners::getBannersListHTML() . '</select>
                  </td>';
        echo '<td width="100">' . $submit_btn . '</td>';
        echo '</tr>';
    }
    echo '<tr id="pagebreak">';
    echo '<td width="120">
                    <strong>' . $_LANG['TAG'] . ':</strong>
              </td>';
    echo '<td>
                    {pagebreak}
              </td>';
    echo '<td width="100">' . $submit_btn . '</td>';
    echo '</tr>';
    echo '<tr id="pagetitle">';
    echo '<td width="120">
                    <strong>' . $_LANG['AD_TITLE'] . ':</strong>
              </td>';
    echo '<td>
                    <input type="text" name="ptitle" style="width:99%" />
              </td>';
    echo '<td width="100">' . $submit_btn . '</td>';
    echo '</tr>';
    echo '</table>';
    echo '</td></tr></table>';
    echo '<script type="text/javascript">showIns();</script>';
}
Ejemplo n.º 3
0
function insertPanel()
{
    global $_LANG;
    $p_html = cmsCore::callEvent('REPLACE_PANEL', array('html' => ''));
    if ($p_html['html']) {
        return $p_html['html'];
    }
    $inCore = cmsCore::getInstance();
    if ($inCore->isComponentInstalled('banners')) {
        $inCore->loadModel('banners');
    }
    $tpl = cmsCore::c('page')->initTemplate('special', 'panel')->assign('bannersInstalled', $inCore->isComponentInstalled('banners'))->assign('forms_options', $inCore->getListItems('cms_forms'));
    if ($inCore->isComponentInstalled('banners')) {
        $tpl->assign('banners_options', cms_model_banners::getBannersListHTML());
    }
    $tpl->display();
}