Ejemplo n.º 1
0
    static function edit($listEdit, $lists, $show, $html)
    {
        ?>
	<fieldset class="jnewscss">
	<legend><?php 
        echo _JNEWS_AUTO_RESP_OPTION;
        ?>
</legend>
	<table class="jnewstable" cellspacing="1">
		<tbody>
		<tr>
			<td width="185" class="key">
				<span class="editlinktip">
				<?php 
        $tip = _JNEWS_INFO_LIST_FOLLOW_UP;
        $title = _JNEWS_FOLLOW_UP;
        echo jNews_Tools::toolTip($tip, '', 280, 'tooltip.png', $title, '', 0);
        ?>
				</span>
			</td>
			<td>
				<input type="text" name="follow_up" class="inputbox" size="6" maxlength="10" value="<?php 
        if (isset($listEdit->follow_up)) {
            echo $listEdit->follow_up;
        } else {
            echo '';
        }
        ?>
" />
			<?php 
        if (!jNews_Auto::good()) {
            echo jnews::printM('no', _JNEWS_NOTSO_GOOD_LIC);
            echo _JNEWS_PLEASE_LIC;
        }
        ?>
			</td>
		</tr>
		</tbody>
	</table>
	</fieldset>
	<?php 
    }
Ejemplo n.º 2
0
 function _showSubcriptionListOld($subscriber, $loggedin = true, $item)
 {
     $HTML = '';
     //We create the dropdown
     if ($this->dropdown) {
         $dropdown = '<input type="hidden" value="1" name="subscribed[1]"  />';
         $dropdown .= '<select class="aca_list_drop" name="sub_list_id[1]" id="sub_list_id[1]">';
     }
     $i = 0;
     $accessLevel = 0;
     $queues = $loggedin ? jNews_ListsSubs::getSubscriberLists($subscriber->id) : '';
     //we retrieve the listIds set in the module
     if (!empty($this->hiddenlistIds)) {
         $hiddenListIds = explode(',', $this->hiddenlistIds);
     }
     if ($this->showListName) {
         foreach ($this->lists as $list) {
             $i++;
             $subscribed = 0;
             $accessLevel = 0;
             if ($loggedin) {
                 if (!empty($queues)) {
                     foreach ($queues as $queue) {
                         if ($list->id == $queue->list_id) {
                             $subscribed = 1;
                             $accessLevel = $queue->acc_level;
                         }
                     }
                 }
             }
             if ($list->html == 1) {
                 $htmlOK = true;
             }
             $checked = 0;
             if ($loggedin) {
                 $checked = $subscribed;
             } else {
                 if ($this->defaultchecked) {
                     $checked = 1;
                 }
                 $subscriber->blacklist = 0;
             }
             $checkedPrint = $checked != 0 ? 'checked="checked"' : '';
             if ($list->hidden == 1) {
                 if ($this->dropdown) {
                     $extraselect = $list->id == $this->selecteddrop ? 'selected' : '';
                     $dropdown .= '<option value="' . $list->id . '" ' . $extraselect . '>' . $list->list_name . '</option>';
                 } else {
                     //889
                     if ($subscriber->blacklist == 0) {
                         if ($loggedin) {
                             $text = "\n" . '<input id="wz_3' . $i . '" type="checkbox" class="inputbox" value="1" name="subscribed[' . $i . ']" ' . $checkedPrint . ' />';
                         } else {
                             if (!$this->red_subscription) {
                                 $text = "\n" . '<input id="wz_3' . $i . '" type="checkbox" class="inputbox" value="' . $list->id . '" name="subscribed[' . $i . ']" ' . $checkedPrint . ' />';
                             } else {
                                 $text = "\n" . '<input id="wz_3' . $i . '" type="checkbox" class="inputbox" value="1" name="subscribed[' . $i . ']" ' . $checkedPrint . ' />';
                             }
                         }
                     } else {
                         if (!$this->red_subscription) {
                             $text = "\n" . '<input type="checkbox" class="inputbox" value="' . $list->id . '" name="subscribedfake[' . $i . ']" ' . $checkedPrint . '  />';
                         } else {
                             $text = "\n" . '<input type="checkbox" class="inputbox" value="1" name="subscribedfake[' . $i . ']" ' . $checkedPrint . '  />';
                         }
                         $text .= "\n" . '<input type="hidden" value="0" name="subscribed[' . $i . ']"  />';
                     }
                     $text .= "\n" . '<input type="hidden" name="sub_list_id[' . $i . ']" value="' . $list->id . '" />';
                     $link = ($list->list_type == '1' or $list->list_type == '7') && $GLOBALS[JNEWS . 'show_archive'] ? 'index.php?option=' . JNEWS_OPTION . $item . '&act=mailing&task=archive&listid=' . $list->id . '&listype=' . $list->list_type : '#';
                     $text .= "\n" . '<span class="aca_list_name"';
                     if ($link == "#") {
                         $text .= " onclick='return false;' ";
                     }
                     $text .= '>' . jNews_Tools::toolTip($list->list_desc, $list->list_name, '', '', $list->list_name, $link, 1) . '</span>';
                     $HTML .= jnews::printLine($this->linear, $text);
                     $HTML .= "\n" . '<input type="hidden" name="acc_level[' . $i . ']" value="' . $accessLevel . '" />' . "\n\r";
                 }
             } else {
                 if (!$loggedin) {
                     $HTML .= '<input type="hidden"  value="1" name="subscribed[' . $i . ']" />';
                     $HTML .= "\n" . '<input type="hidden" name="sub_list_id[' . $i . ']" value="' . $list->id . '" id="hidden_sub_lists"/>';
                 }
             }
         }
     } else {
         foreach ($this->lists as $list) {
             $i++;
             $subscribed = 0;
             $accessLevel = 0;
             if ($loggedin) {
                 if (!empty($queues)) {
                     foreach ($queues as $queue) {
                         if ($list->id == $queue->list_id) {
                             $subscribed = 1;
                             $accessLevel = $queue->acc_level;
                         }
                     }
                 }
             }
             if ($list->html == 1) {
                 $htmlOK = true;
             }
             $checked = 0;
             if ($loggedin) {
                 $checked = $subscribed;
             } else {
                 if ($this->defaultchecked) {
                     $checked = 1;
                 }
             }
             $HTML .= '<input type="hidden"  value="' . $checked . '" name="subscribed[' . $i . ']" />';
             $HTML .= "\n" . '<input type="hidden" name="sub_list_id[' . $i . ']" value="' . $list->id . '" id="hidden_sub_lists"/>';
             $HTML .= "\n" . '<input type="hidden" name="acc_level[' . $i . ']" value="' . $accessLevel . '" />';
             if ($list->html == 1) {
                 $htmlOK = true;
             }
         }
     }
     if ($this->dropdown) {
         $dropdown .= '</select><br/>';
         $HTML .= $dropdown;
     }
     return $HTML;
 }
Ejemplo n.º 3
0
function jnewsbot_share_editab()
{
    ob_start();
    $js = "function setShareTag(changed){\n\t\tvar form = document.adminForm;\n\t\tif(!form){\n\t\t\tform = document.mosForm;\n\t\t}\n\t\tif(changed!=null){\n\t\t\tvar tag = '{tag:share name=';\n\t\t\tvar media = '';\n\t\t\tvar facebook = 0;\n\t\t\tvar linkedin = 0;\n\t\t\tvar twitter = 0;\n\t\t\n\t\t\tfor (i=0;i<form.facebook.length;i++) {\n\t\t\t\tif (form.facebook[i].checked) {\n\t\t\t\t\tfacebook = form.facebook[i].value;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tfor (i=0;i<form.linkedin.length;i++) {\n\t\t\t\tif (form.linkedin[i].checked) {\n\t\t\t\t\tlinkedin = form.linkedin[i].value;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tfor (i=0;i<form.twitter.length;i++) {\n\t\t\t\tif (form.twitter[i].checked) {\n\t\t\t\t\ttwitter = form.twitter[i].value;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif(facebook == 1) media = media + 'facebook';\n\t\t\t\n\t\t\tif((facebook==1 && linkedin==1)) media = media + ','; \n\t\t\t\n\t\t\tif(linkedin == 1) media = media + 'linkedin';\t\n\t\t\t\n\t\t\tif((facebook==1 || linkedin==1) && twitter == 1) media = media + ','; \n\t\t\t\n\t\t\tif(twitter == 1) media = media + 'twitter';\t\n\t\t\t\n\t\t\tif(media == '') tag = media;\n\t\t\telse tag = tag + media + '}';\n\t\t\t\n\t\t\t\n\t\t\tform.sharetag.value= tag;\n\t\t\t\n\t\t}else{\n\t\t\tvar sharetag = form.sharetag.value;";
    if (version_compare(JVERSION, '1.6.0', '<')) {
        //1.5
        $js .= " if(window.top.insertTag(sharetag)){window.top.document.getElementById('sbox-window').close();}";
    } else {
        if (version_compare(JVERSION, '3.0.0', '<')) {
            $js .= ' if(window.top.insertTag(sharetag)) {window.parent.SqueezeBox.close();}';
        } else {
            $js .= ' if(window.top.insertTag(sharetag)) {           
                     var need_click = jQuery(window.top.document).find("div.modal-backdrop");
                    if(need_click.length == 0) window.parent.SqueezeBox.close();
                    else    jQuery(window.top.document).find("div.modal-backdrop").click();}';
        }
    }
    $js .= "}\n\t}";
    $doc = JFactory::getDocument();
    $doc->addScriptDeclaration($js);
    ?>


<style type="text/css">
table.smartcontent {
	border: 1px solid #D5D5D5;
	background-color: #F6F6F6;
	width: 100%;
	margin-bottom: 10px;
	-moz-border-radius:3px;
	-webkit-border-radius:3px;
	padding: 5px;
}
table.smartcontent td.key {
	background-color: #f6f6f6;
	text-align: left;
	width: 140px;
	color: #666;
	font-weight: bold;
	border-bottom: 1px solid #e9e9e9;
	border-right: 1px solid #e9e9e9;
}
</style>
<div id="element-box">
<div class="t">
<div class="t">
<div class="t"></div>
</div>
</div>
<div class="m">
<form name="adminForm" method="post" action="index.php" id="adminForm">
<div id="element-box">
<table class="smartcontent" width="100%">

<tr>
	<td width="185" class="key">
		<span class="editlinktip">
			<?php 
    $tip = 'Select yes to add Facebook tag)';
    $title = 'Facebook';
    echo jNews_Tools::toolTip($tip, '', 280, 'tooltip.png', $title, '', 0);
    ?>
		</span>
	</td>
	<td style="vertical-align: top;">
		<input type="radio" name="facebook" value="1" checked="checked" onclick="setShareTag(1)"/><?php 
    echo 'Yes';
    ?>
        <input type="radio" name="facebook" value="0" onclick="setShareTag(1)"/><?php 
    echo 'No';
    ?>
	</td>
</tr>

<tr>
	<td width="185" class="key">
		<span class="editlinktip">
			<?php 
    $tip = 'Select yes to add LinkedIn tag)';
    $title = 'LinkedIn';
    echo jNews_Tools::toolTip($tip, '', 280, 'tooltip.png', $title, '', 0);
    ?>
		</span>
	</td>
	<td style="vertical-align: top;">
		<input type="radio" name="linkedin" value="1" checked="checked" onclick="setShareTag(1)"/><?php 
    echo 'Yes';
    ?>
        <input type="radio" name="linkedin" value="0" onclick="setShareTag(1)"/><?php 
    echo 'No';
    ?>
	</td>
</tr>

<tr>
	<td width="185" class="key">
		<span class="editlinktip">
			<?php 
    $tip = 'Select yes to add Twitter tag)';
    $title = 'Twitter';
    echo jNews_Tools::toolTip($tip, '', 280, 'tooltip.png', $title, '', 0);
    ?>
		</span>
	</td>
	<td style="vertical-align: top;">
		<input type="radio" name="twitter" value="1" checked="checked" onclick="setShareTag(1)"/><?php 
    echo 'Yes';
    ?>
        <input type="radio" name="twitter" value="0" onclick="setShareTag(1)"/><?php 
    echo 'No';
    ?>
	</td>
</tr>
</table>
<table class="smartcontent" width="100%">
<tr>
	<td width="185" class="key">
		<span class="editlinktip">
			Tag
		</span>
	</td>
	<td style="vertical-align: top;">
		<input type="text" size="70px" name="sharetag" readonly="true" value="{tag:share name=facebook,linkedin,twitter}">
	</td>
	<td rowspan="2">
		<input onclick="setShareTag(null)" class="sharetag" type="button" label="Insert Tag" name="Insert Tag" value="<?php 
    echo _JNEWS_TAG_INSERT_TAG;
    ?>
" />
	</td>
</tr>
</table>
</form>
</div>
</div>
<div class="b">
<div class="b">
<div class="b"></div>


</div>
</div>
</div>
<?php 
    $return = ob_get_contents();
    ob_end_clean();
    return array(_JNEWS_TAGMENU_MEDIA_SHARE, $return);
}
Ejemplo n.º 4
0
function jnewsbot_k2_editab()
{
    $limit = 5;
    $limittotal = countK2Items();
    $setLimitk2 = jnews::setLimitPagination($limittotal);
    $task = JRequest::getVar('task');
    //filter
    if (isset($_POST['contentsearchk2'])) {
        $contentsearch = JRequest::getVar('contentsearchk2', 'post', '', 'string');
    } else {
        $contentsearch = "";
    }
    $toSearch = new stdClass();
    $toSearch->forms = '';
    //$toSearch->hidden = $hidden;
    $toSearch->listsearch = $contentsearch;
    $toSearch->id = 'contentsearchk2';
    $app = JFactory::getApplication();
    $setSortk2 = new stdClass();
    if (!isset($_POST['k2_filter_order'])) {
        $setSortk2->orderValue = "a.id";
    } else {
        $setSortk2->orderValue = $_POST['filter_order'];
    }
    $setSortk2->orderDir = $app->getUserStateFromRequest(JNEWS_OPTION . '.k2content.filter_order_Dir', 'filter_order_Dir', 'desc', 'word');
    $sort_select = JRequest::getVar('filter_category_id_k2', '', 'POST', 'int');
    $k2contentitems = jnewsbot_k2_getitems($contentsearch, $setLimitk2, $setSortk2, $sort_select);
    ob_start();
    $js = "var id_global, content_type, hide_title_global;\n            function setContentTag(id, hide_title_or_rendering)\n            {\n                if(id != null) {\n\n                    if(document.getElementById('for_disabled').checked === false)\n                    {\n                         document.getElementById('hide_title_yes').disabled=false;\n                    }\n\n                    if(hide_title_or_rendering ==undefined && hide_title_global == undefined)\n                    {\n                         hide_title_global = 0;\n                    }\n                    if(hide_title_or_rendering ==undefined && content_type == undefined)\n                    {\n                        content_type = 0;\n                    }\n                    if(id ==='rendering')\n                    {\n                        content_type = hide_title_or_rendering;\n                        if(id_global == undefined)  id_global = 0;\n                        if(hide_title_global == undefined) hide_title_global = 0;\n                        if(hide_title_or_rendering == 2)\n                        {\n                           // hide_title_global = 0;\n                            document.getElementById('hide_title_no').click();\n                            document.getElementById('hide_title_yes').disabled=true;\n\n                        }\n                    }\n                    if(id == 'hide_title')\n                    {\n                        hide_title_global = hide_title_or_rendering;\n                        if(id_global == undefined) id_global = 0;\n                        if(content_type == undefined) content_type = 0;\n                    }\n                    if( id % 1 === 0)\n                    {\n                        id_global = id;\n                        if(content_type == undefined) content_type = 0;\n                        if(hide_title_global == undefined) hide_title_global = 0;\n                    }\n\n                    var form = document.adminForm;\n                    if(!form){\n                            form = document.mosForm;\n                    }\n                    var tag = '{k2item:' + id_global + '|' + content_type +'|'+hide_title_global+ '}';\n                    form.k2tag.value = tag;\n\n                }\n                else\n                {           var form = document.adminForm;\n                            if(!form){\n                                    form = document.mosForm;\n                            }\n                            var tag = form.k2tag.value;     ";
    if (version_compare(JVERSION, '1.6.0', '<')) {
        //1.5
        $js .= " if(window.top.insertTag(tag)){window.top.document.getElementById('sbox-window').close();}";
    } else {
        if (version_compare(JVERSION, '3.0.0', '<')) {
            $js .= ' if(window.top.insertTag(tag)) {window.parent.SqueezeBox.close();}';
        } else {
            $js .= ' if(window.top.insertTag(tag)) {
                    var need_click = jQuery(window.top.document).find("div.modal-backdrop");
                    if(need_click.length == 0) window.parent.SqueezeBox.close();
                    else    jQuery(window.top.document).find("div.modal-backdrop").click();}';
        }
    }
    $js .= "}\n\t}";
    //if(window.top.insertTag(tag)){window.top.document.getElementById('sbox-window').close();}
    $doc = JFactory::getDocument();
    $doc->addScriptDeclaration($js);
    ?>


<style type="text/css">
table.smartcontent {
	border: 1px solid #D5D5D5;
	background-color: #F6F6F6;
	width: 100%;
	margin-bottom: 10px;
	-moz-border-radius:3px;
	-webkit-border-radius:3px;
	padding: 5px;
}
table.smartcontent td.key {
	background-color: #f6f6f6;
	text-align: left;
	width: 140px;
	color: #666;
	font-weight: bold;
	border-bottom: 1px solid #e9e9e9;
	border-right: 1px solid #e9e9e9;
}
</style>
<div id="element-box">
<div class="t">
    <div class="t">
        <div class="t"></div>
    </div>
</div>
<div class="m">



<form id="adminForm" name="adminForm" method="post" action="index.php?option=<?php 
    echo JNEWS_OPTION;
    ?>
&tmpl=component&act=tags&task=k2content">



<table class="smartcontent" width="100%">
<tr>
<td width="185" class="key">
<span class="editlinktip">
<?php 
    $tip = _JNEWS_AUTONEWS_TYPE_TIPS;
    $title = _JNEWS_AUTONEWS_TYPE;
    echo jNews_Tools::toolTip($tip, '', 280, 'tooltip.png', $title, '', 0);
    ?>
</span>
</td>
<td style="vertical-align: top;">
<span class="editlinktip">
<?php 
    $tip = _JNEWS_TITLE_ONLY_TIPS;
    $title = _JNEWS_TITLE_ONLY;
    $title_only = "<span class=\"editlinktip\">" . jNews_Tools::toolTip($tip, '', 280, 'tooltip.png', $title, '', 0) . "</span>";
    $tip = _JNEWS_INTRO_ONLY_TIPS;
    $title = _JNEWS_INTRO_ONLY;
    $intro_only = "<span class=\"editlinktip\">" . jNews_Tools::toolTip($tip, '', 280, 'tooltip.png', $title, '', 0) . "</span>";
    $tip = _JNEWS_FULL_ARTICLE_TIPS;
    $title = _JNEWS_FULL_ARTICLE;
    $full_article = "<span class=\"editlinktip\">" . jNews_Tools::toolTip($tip, '', 280, 'tooltip.png', $title, '', 0) . "</span>";
    ?>
</span>
<span class="editlinktip">
    <input type="radio" onclick="setContentTag('rendering', 0)" name="content_type" value="0" checked="checked" /><?php 
    echo $full_article;
    ?>
    <input type="radio"  onclick="setContentTag('rendering', 1)" name="content_type" value="1" /><?php 
    echo $intro_only;
    ?>
    <input id="for_disabled" type="radio" onclick="setContentTag('rendering', 2)" name="content_type" value="2" /><?php 
    echo $title_only;
    ?>
</span>

</td>
<td rowspan="2">
        <input onclick="setContentTag(null)" class="inserttag" type="button" label="Insert Tag" name="Insert Tag" value="<?php 
    echo _JNEWS_TAG_INSERT_TAG;
    ?>
"/>
</td>
</tr>

<tr>
	<td width="185" class="key">
		<span class="editlinktip">
			Tag
		</span>
	</td>
	<td style="vertical-align: top;">
		<!-- 	<input type="text" onchange="setCaptionTags();" size="60px" name="jnewstagcaption"> -->
			<input type="text" size="60px" name="k2tag">
	</td>
</tr>
<tr>
	<td width="185" class="key">
		<span class="editlinktip">
                    <?php 
    $tip = _JNEWS_HIDE_TITTLE_ARTICLE_TIPS;
    $title = _JNEWS_HIDE_TITLE;
    echo jNews_Tools::toolTip($tip, '', 280, 'tooltip.png', $title, '', 0);
    ?>
		</span>
	</td>
	<td style="vertical-align: top;">
            <span class="hide_title" >
                <input id="hide_title_no" onclick="setContentTag('hide_title', 0);" type="radio" name="hide_title" value="0" checked="checked" /><?php 
    echo 'No';
    ?>
                <input id="hide_title_yes" onclick="setContentTag('hide_title', 1);" type="radio" name="hide_title" value="1" /><?php 
    echo 'Yes';
    ?>
            </span>
        </td>
</tr>
</table>
<div id="element-box">
    <div class="t">
        <div class="t">
            <div class="t"></div>
        </div>
    </div>


    <div class="m"  style="position:relative;">


    <input type="hidden" name="option" value="<?php 
    echo JNEWS_OPTION;
    ?>
" />
    <input type="hidden" name="limit" value="<?php 
    echo $limit;
    ?>
" />
<!--////////////////////////////////////////////////////-->
        <?php 
    echo jnews::setTop($toSearch, null);
    $category_list_k2 = getAllCategoriesK2();
    ?>
        <div style="position:absolute;top:5px; left:55%;">
            <select name="filter_category_id_k2" class="inputbox" onchange="this.form.submit()">
                <option value=""><?php 
    echo JText::_('JOPTION_SELECT_CATEGORY');
    ?>
</option>
                <?php 
    for ($i = 0; $i < count($category_list_k2); $i++) {
        ?>
                <option value="<?php 
        echo $category_list_k2[$i]->id;
        ?>
"  <?php 
        if ($sort_select == $category_list_k2[$i]->id) {
            echo "selected";
        }
        ?>
>
                    <?php 
        echo $category_list_k2[$i]->name;
        ?>
                </option>
               <?php 
    }
    ?>
            </select>
        </div>
        <table class="<?php 
    echo jnews::myTheme();
    ?>
" cellpadding="0" cellspacing="0">
            <tbody>
                <thead>
                    <tr>
                        <th width="80px" class="title">
                                <?php 
    if ($setSortk2->orderDir == 'asc') {
        $new_sort = "desc";
    } else {
        $new_sort = "asc";
    }
    ?>
                                    <a class="hasTip" title="" onclick="Joomla.tableOrdering('a.title','<?php 
    echo $new_sort;
    ?>
', 'k2content');" href="#">
                                       <?php 
    echo _JNEWS_TAGPICKLIST_TITLE;
    ?>
                                         <?php 
    if ($setSortk2->orderValue == 'a.title') {
        ?>
<i class="icon-arrow-<?php 
        echo $new_sort == "asc" ? "up" : "down";
        ?>
"></i><?php 
    }
    ?>
                                    </a>

                        </th>
                           <th width="80px" class="title">
                                <?php 
    if ($setSortk2->orderDir == 'asc') {
        $new_sort = "desc";
    } else {
        $new_sort = "asc";
    }
    ?>
                                    <a class="hasTip" title="" onclick="Joomla.tableOrdering('a.title_2','<?php 
    echo $new_sort;
    ?>
', 'k2content');" href="#">
                                        <?php 
    echo _JNEWS_TAG_ARTICLESECTION;
    ?>
                                         <?php 
    if ($setSortk2->orderValue == 'a.title_2') {
        ?>
<i class="icon-arrow-<?php 
        echo $new_sort == "asc" ? "up" : "down";
        ?>
"></i><?php 
    }
    ?>
                                    </a>

                        </th>
                        <th width="80px" class="title">
                                <?php 
    if ($setSortk2->orderDir == 'asc') {
        $new_sort = "desc";
    } else {
        $new_sort = "asc";
    }
    ?>
                                    <a class="hasTip" title="" onclick="Joomla.tableOrdering('a.catid','<?php 
    echo $new_sort;
    ?>
', 'k2content');" href="#">
                                        <?php 
    echo _JNEWS_TAG_ARTICLECATEGORY;
    ?>
                                         <?php 
    if ($setSortk2->orderValue == 'a.catid') {
        ?>
<i class="icon-arrow-<?php 
        echo $new_sort == "asc" ? "up" : "down";
        ?>
"></i><?php 
    }
    ?>
                                    </a>

                        </th>
                        <th width="80px" class="title">
                                <?php 
    if ($setSortk2->orderDir == 'asc') {
        $new_sort = "desc";
    } else {
        $new_sort = "asc";
    }
    ?>
                                    <a class="hasTip" title="" onclick="Joomla.tableOrdering('a.id','<?php 
    echo $new_sort;
    ?>
', 'k2content');" href="#">
                                       <?php 
    echo "  ID";
    ?>
                                         <?php 
    if ($setSortk2->orderValue == 'a.id') {
        ?>
<i class="icon-arrow-<?php 
        echo $new_sort == "asc" ? "up" : "down";
        ?>
"></i><?php 
    }
    ?>
                                    </a>

                        </th>

                    </tr>
                </thead>
                <?php 
    if (sizeof($k2contentitems) > 0) {
        $k = 0;
        foreach ($k2contentitems as $k2contentitem) {
            if (empty($k2contentitem->section)) {
                $k2contentitem->section = JText::_('Uncategorised');
            }
            if (empty($k2contentitem->category)) {
                $k2contentitem->category = JText::_('Uncategorised');
            }
            echo '<tr style="cursor:pointer" class="row' . $k . '" onclick="setContentTag(\'' . $k2contentitem->id . '\');" ><td>' . $k2contentitem->title . '</td><td nowrap="nowrap" align="center">' . $k2contentitem->section . '</td><td nowrap="nowrap" align="center">' . $k2contentitem->category . '</td><td nowrap="nowrap" align="center">' . $k2contentitem->id . '</td></tr>';
            $k = 1 - $k;
        }
    }
    ?>
            </tbody>
        </table>
   <?php 
    echo jnews::setPaginationBot($setLimitk2, 'margin:auto;');
    ?>

</div>
<div class="b">
<div class="b">
<div class="b"></div>
</div>
</div>
</div>
                <input type="hidden" value="<?php 
    echo $task;
    ?>
" name="task"/>
                <input type="hidden" value="<?php 
    echo $setSortk2->orderValue;
    ?>
" name="k2_filter_order"/>
                  <input type="hidden" value="<?php 
    echo $setSortk2->orderValue;
    ?>
" name="filter_order"/>
                <input type="hidden" value="<?php 
    echo $setSortk2->orderDir;
    ?>
" name="filter_order_Dir"/>
</form>
</div>
<div class="b">
<div class="b">
<div class="b"></div>
</div>
</div>
</div>
<?php 
    $return = ob_get_contents();
    ob_end_clean();
    return array(_JNEWS_CONTENT_ITEM, $return);
}
Ejemplo n.º 5
0
    public static function jcalpro()
    {
        $db = JFactory::getDBO();
        $tip = _JNEWS_JCALTAGS_DESC_TIPS;
        $title = _JNEWS_JCALTAGS_DESC;
        $desc = "<span class=\"editlinktip\">" . jNews_Tools::toolTip($tip, '', 280, 'tooltip.png', $title, '', 0) . "</span>";
        $tip = _JNEWS_JCALTAGS_START_TIPS;
        $title = _JNEWS_JCALTAGS_START;
        $start = "<span class=\"editlinktip\">" . jNews_Tools::toolTip($tip, '', 280, 'tooltip.png', $title, '', 0) . "</span>";
        $tip = _JNEWS_JCALTAGS_READMORE_TIPS;
        $title = _JNEWS_JCALTAGS_READMORE;
        $read = "<span class=\"editlinktip\">" . jNews_Tools::toolTip($tip, '', 280, 'tooltip.png', $title, '', 0) . "</span>";
        $query = "SELECT `cat_id`,`cat_name` FROM #__jcalpro2_categories";
        $db->setQuery($query);
        $jcalcats = $db->loadObjectList();
        $events = array();
        $year = intval(date('Y'));
        if (!empty($jcalcats)) {
            foreach ($jcalcats as $jcalcat) {
                $query = "SELECT `extid`, `title` ,`start_date` FROM #__jcalpro2_events where `cat` = " . $jcalcat->cat_id . " AND (`start_date` >= '" . $year . "' OR `end_date` >= '" . $year . "' ) ORDER BY `start_date` DESC";
                $db->setQuery($query);
                $events[$jcalcat->cat_id] = $db->loadObjectList();
            }
        }
        ?>
<script type="text/javascript">
<!--

var events = new Array;

<?php 
        if (!empty($events)) {
            $i = 0;
            foreach ($events as $cat => $eventcat) {
                if (!empty($eventcat)) {
                    foreach ($eventcat as $event) {
                        echo 'events[' . $i . '] = new Array(\'' . $cat . '\',\'' . $event->extid . '\',\'' . addslashes($event->title) . ' (' . $event->start_date . ')\');' . "\n";
                        $i++;
                    }
                }
            }
        }
        ?>
var formname = 'adminForm';
if(!document.adminForm){
	formname = 'mosForm';
}

function updatejCalCat(){

	var catid = eval('document.'+formname+'.jcal_cat.value');
	var list = eval( 'document.'+formname+'.jcal_event');

	var i = 0;
	// empty the list
	for (i in list.options.length) {
		list.options[i] = null;
	}
	i = 0;
	for (a in events) {
		if (events[a][0] == catid) {
			opt = new Option();
			opt.value = events[a][1];
			opt.text = events[a][2];
			list.options[i++] = opt;
		}
	}
	list.length = i;

}

function updatejCaltag(){
	var eventid = eval('document.'+formname+'.jcal_event.value');
	var start = eval('document.'+formname+'.jcal_start');
	var desc = eval('document.'+formname+'.jcal_desc');
	var read = eval('document.'+formname+'.jcal_read');
	var tag = eval('document.'+formname+'.jcal_tag');

	for (i=0;i<start.length;i++) {
        if (start[i].checked) {
             var start_value = start[i].value;
        }
    }
	for (i=0;i<desc.length;i++) {
        if (desc[i].checked) {
             var desc_value = desc[i].value;
        }
    }
	for (i=0;i<read.length;i++) {
        if (read[i].checked) {
             var read_value = read[i].value;
        }
    }

	tag.value = "{jcalevent:" + eventid + "|" + start_value + "|" + desc_value + "|" + read_value + "}";
}
//-->
</script>

		<table class="jnewscss_bots" width="100%">
			<tr>
				<td style="vertical-align: top;" colspan="2">
				<?php 
        $tip = _JNEWS_JCALTAGS_TITLE_TIPS;
        $title = _JNEWS_JCALTAGS_TITLE;
        echo jNews_Tools::toolTip($tip, '', 280, 'tooltip.png', $title, '', 0);
        ?>
					<input class="inputbox" type="text" onfocus="this.select();" size="20" name="jcal_tag"/>
				</td>
			</tr>
			<tr>
				<td>
					<?php 
        echo $start;
        ?>
				</td>
				<td>
	                <input type="radio" name="jcal_start" value="0" onclick="updatejCaltag();" />
	                <img src="<?php 
        echo JNEWS_PATH_ADMIN_IMAGES2;
        ?>
16/status_r.png" width="12" height="12" border="0" alt="No" />
	                <input type="radio" name="jcal_start" value="1" checked="checked" onclick="updatejCaltag();" />
	                <img src="<?php 
        echo JNEWS_PATH_ADMIN_IMAGES2;
        ?>
16/status_g.png" width="12" height="12" border="0" alt="Yes" />
	             </td>
			</tr>
			<tr>
				<td>
					<?php 
        echo $desc;
        ?>
				</td>
				<td>
					<input type="radio" name="jcal_desc" value="0"  onclick="updatejCaltag();" />
	                <img src="<?php 
        echo JNEWS_PATH_ADMIN_IMAGES2;
        ?>
16/status_r.png" width="12" height="12" border="0" alt="No" />
	                <input type="radio" name="jcal_desc" value="1"  checked="checked" onclick="updatejCaltag();" />
	                <img src="<?php 
        echo JNEWS_PATH_ADMIN_IMAGES2;
        ?>
16/status_g.png" width="12" height="12" border="0" alt="Yes" />
				</td>
			</tr>
			<tr>
				<td>
					<?php 
        echo $read;
        ?>
				</td>
				<td>
					<input type="radio" name="jcal_read" value="0" onclick="updatejCaltag();" />
	                <img src="<?php 
        echo JNEWS_JPATH_LIVE;
        ?>
/administrator/images/publish_x.png" width="12" height="12" border="0" alt="No" />
	                <input type="radio" name="jcal_read" value="1" checked="checked" onclick="updatejCaltag();" />
	                <img src="<?php 
        echo JNEWS_JPATH_LIVE;
        ?>
/administrator/images/tick.png" width="12" height="12" border="0" alt="Yes" />
				</td>
			</tr>
			<tr>
				<td colspan="2">
<?php 
        echo '<select class="inputbox" onchange="updatejCalCat();" size="1" name="jcal_cat">';
        if (!empty($jcalcats)) {
            foreach ($jcalcats as $jcalcat) {
                echo '<option value="' . $jcalcat->cat_id . '">' . $jcalcat->cat_name . '</option>';
            }
        }
        echo '</select>';
        ?>
				</td>
			</tr>
			<tr>
				<td colspan="2">
					<select name="jcal_event" class="inputbox" size="30" onchange="updatejCaltag();">
					<?php 
        if (!empty($jcalcats)) {
            if (!empty($events[$jcalcats[0]->cat_id])) {
                foreach ($events[$jcalcats[0]->cat_id] as $event) {
                    echo '<option value="' . $event->extid . '">' . $event->title . ' (' . $event->start_date . ') </option>' . "\n";
                }
            }
        }
        ?>
					</select>
				</td>
			</tr>
		</table>
<?php 
    }
Ejemplo n.º 6
0
    public static function notification($listEdit, $lists, $show, $html)
    {
        $editor = JFactory::getEditor();
        ?>
		<fieldset class="jnewscss">
		<legend><span class="editlinktip"><?php 
        echo _JNEWS_SUBSCRIPTION_SETTINGS;
        ?>
</span></legend>
		<table class="jnewstable" width="100%"  cellspacing="1">
			<tbody>
			<tr>
				<td width="185" class="key">
					<span class="editlinktip">
					<?php 
        $tip = _JNEWS_SUBSCRIPTION_NOTIFY_TIPS;
        $title = _JNEWS_SUBSCRIPTION_NOTIFY;
        echo jNews_Tools::toolTip($tip, '', 280, 'tooltip.png', $title, '', 0);
        ?>
					</span>
				</td>
				<td>
					<?php 
        echo $lists['subnotifysend'];
        ?>
					<br /><br />
				</td>
			</tr>
			<tr>
				<td width="185" class="key" style="vertical-align: top;">
				<span class="editlinktip">
					<?php 
        $tip = _JNEWS_SUBNOTIFY_MSG_TIPS;
        $title = _JNEWS_SUBNOTIFY_MSG;
        ?>
					<?php 
        echo jNews_Tools::toolTip($tip, '', 280, 'tooltip.png', $title, '', 0);
        ?>
					</span><br />
				</td>
				<td>
					<?php 
        if ($html) {
            echo $editor->display('subnotifymsg', $listEdit->subnotifymsg, '100%', '110', '75', '20');
        }
        ?>
				</td>
			</tr>
			</tbody>
		</table>
		</fieldset>

		<?php 
        if (true || $show['unsusbcribe']) {
            ?>
		<fieldset class="jnewscss">
		<legend><span class="editlinktip"><?php 
            echo _JNEWS_UNSUB_SETTINGS;
            ?>
</span></legend>
		<table class="jnewstable" width="100%" cellspacing="1">
			<tbody>
			<tr>
				<td width="185" class="key">
					<span class="editlinktip">
					<?php 
            $tip = _JNEWS_SEND_UNSUBNOTIFY_TIPS;
            $title = _JNEWS_UNSUB_NOTIFYMSG;
            echo jNews_Tools::toolTip($tip, '', 280, 'tooltip.png', $title, '', 0);
            ?>
					</span>
				</td>
				<td>
					<?php 
            echo $lists['unsubscribenotifyadmin'];
            ?>
					<br /><br />
				</td>
			</tr>
			<tr>
				<td width="185" class="key" style="vertical-align: top;">
				<span class="editlinktip">
					<?php 
            $tip = _JNEWS_INFO_AMIN_UNSUB_NOTIFY;
            $title = _JNEWS_UNSUB_ADMINMESSAGE;
            ?>
					<?php 
            echo jNews_Tools::toolTip($tip, '', 280, 'tooltip.png', $title, '', 0);
            ?>
					</span><br />
				</td>
				<td>
					<?php 
            if ($html) {
                echo $editor->display('notifyadminmsg', $listEdit->notifyadminmsg, '100%', '110', '75', '20');
            }
            ?>
				</td>
			</tr>
			</tbody>
		</table>
		</fieldset>
		<?php 
        }
    }
Ejemplo n.º 7
0
    public static function unsubscribe($subscriber, $subscriberId, $cle = '', $mailingId, $action)
    {
        $Itemid = JRequest::getInt('Itemid');
        $db = JFactory::getDBO();
        echo '<div class="jNewsUnsubscribe">';
        if (!empty($subscriberId) and !empty($cle)) {
            $i = 0;
            if (md5($subscriber->email) == $cle) {
                //$subscriber
                frontHTML::formStart(_JNEWS_SUBSCRIPTIONS, 0, 'unsubscribe');
                $query = 'SELECT L.`list_name`, L.`list_desc`, L.`hidden` ,L.`acc_level`, L.`id`, LM.`list_id`,L.`list_type` FROM `#__jnews_lists` AS L ' . 'LEFT JOIN `#__jnews_listmailings` AS LM ON L.`id` = LM.`list_id` ' . 'LEFT JOIN `#__jnews_listssubscribers` AS LS ON  L.`id` = LS.`list_id` ' . 'WHERE LM.`mailing_id`=' . $mailingId . ' AND LS.`subscriber_id`=' . $subscriberId;
                $query .= ' AND LS.`unsubscribe`= 0';
                //			    $query .= ' AND ( L.`hidden`!=0 AND L.`published`!=0 )';//7788744
                $query .= ' AND ( L.`published`!=0 )';
                $query .= jnews::orderBy('list_idA');
                $db->setQuery($query);
                $lists = $db->loadObjectList();
                if (empty($lists)) {
                    //invisible or unpublished
                    jnews::printM('ok', _JNEWS_LISTS_UNSUBMSG);
                    return false;
                }
                $checked = 1;
                $checkedPrint = $checked != 0 ? 'checked="checked"' : '';
                $mainLink = 'option=' . JNEWS_OPTION;
                $mainLink = jNews_Tools::completeLink($mainLink, false, false);
                echo '<form method="post" action="' . $mainLink . '" onsubmit="submitbutton();return false;" name="mosForm" >' . "\n\r";
                echo '<input type="hidden" name="Itemid" value="' . $Itemid . '" />';
                if (!empty($lists)) {
                    foreach ($lists as $list) {
                        $i++;
                        $checkedPrint = $checked != 0 ? 'checked="checked"' : '';
                        echo "\n" . '<input id="wz_3' . $i . '" type="checkbox" class="inputbox" value="1" name="unsubscribed[' . $i . ']" ' . $checkedPrint . ' />';
                        echo "\n" . '<input type="hidden" name="sub_list_id[' . $i . ']" value="' . $list->id . '" />';
                        echo "\n" . '<span class="aca_list_name"';
                        echo '>' . jNews_Tools::toolTip($list->list_desc, $list->list_name, '', '', $list->list_name, '', 1) . '</span>';
                        echo '<br>';
                    }
                }
                echo '<br>';
                $link = 'option=' . JNEWS_OPTION . '&act=change&subscriber=' . $subscriberId . '&cle=' . $cle . '&Itemid=' . $Itemid;
                $link = jNews_Tools::completeLink($link, false);
                ?>
		   		<input type="hidden" name="option" value="<?php 
                echo JNEWS_OPTION;
                ?>
" />
				<input type="hidden" name="act" value="<?php 
                echo $action;
                ?>
" />
		   		<input type="hidden" name="task" value="" />
		    	<input type="hidden" name="boxchecked" value="0" />
		   		<input type="hidden" name="subscriber_id" value="<?php 
                echo $subscriber->id;
                ?>
" />
		   		<input type="hidden" name="cle" value="<?php 
                echo md5($subscriber->email);
                ?>
" />
		   		<div class="subscribe">
				<?php 
                if ($i == 1) {
                    echo _JNEWS_UNSUBSCRIBE_MESSAGE . '<br /><br />';
                } else {
                    echo _JNEWS_UNSUBSTOLISTS_MESSAGE;
                }
                ?>
</div>
                                <div id="otherreasons">
                                        <label for="other"><?php 
                echo _JNEWS_UNSUBSCRIBE_MESSAGE_TEXTAREA;
                ?>
</label><br>
                                        <textarea rows="5" cols="50" id="other" name="textareamess"></textarea>
                                </div>

                                <?php 
                frontHTML::formEndUnsubscribe($link, $cle, $subscriberId);
                //for unsubscribe all
                if ($GLOBALS[JNEWS . 'show_unsubscribe_all']) {
                    $link = 'option=' . JNEWS_OPTION . '&act=unsubscribeall&subscriber=' . $subscriberId . '&cle=' . $cle . '&Itemid=' . $Itemid;
                    $link = jNews_Tools::completeLink($link, false);
                    echo '<a href="' . $link . '"> ' . _JNEWS_UNSUBSCRIBE_ALL_OR . '</a>';
                    echo '<br /><br /><br />';
                }
            } else {
                return false;
            }
        } else {
            return false;
        }
        echo '</div>';
    }
Ejemplo n.º 8
0
function jnewsbot_content_editab($forms)
{
    if (version_compare(JVERSION, '3.0.0', '<')) {
        JHTML::_('behavior.mootools');
    } else {
        JHtmlBehavior::framework();
    }
    $siteContent = new siteContent();
    //	$limit = -1;
    $limit = 5;
    $limittotal = $siteContent->countSiteCount();
    $setLimit = jnews::setLimitPagination($limittotal);
    $action = JRequest::getVar('act', '', '', 'WORD');
    $task = JRequest::getVar('task');
    $contentsearch = JRequest::getVar('contentsearch', '');
    echo $forms['main'];
    $hidden = '<input type="hidden" name="option" value="' . JNEWS_OPTION . '" />';
    $hidden .= '<input type="hidden" name="limit" value="' . $limit . '" />';
    $toSearch = new stdClass();
    $toSearch->forms = '';
    $toSearch->hidden = $hidden;
    $toSearch->listsearch = $contentsearch;
    $toSearch->id = 'contentsearch';
    $app = JFactory::getApplication();
    $setSort = new stdClass();
    if (!isset($_POST['c_filter_order'])) {
        $setSort->orderValue = "a.id";
    } else {
        $setSort->orderValue = $_POST['filter_order'];
    }
    //$setSort->orderValue = $app->getUserStateFromRequest(JNEWS_OPTION . '.content.filter_order', 'filter_order', 'a.id', 'cmd');
    $setSort->orderDir = $app->getUserStateFromRequest(JNEWS_OPTION . '.content.filter_order_Dir', 'filter_order_Dir', 'desc', 'word');
    //$setSort->orderValue  = "a.id";
    $contentItems = jnewsbot_content_getitems($contentsearch, $setLimit, $setSort);
    ob_start();
    $js = "function setContentTag(id, url, changeType , hide_title)\n           {\n\n                if(hide_title ==undefined)\n                {\n                    var check_title =  document.getElementById('hide_title_no').checked;\n                    if(check_title) hide_title = 0;\n                    else            hide_title = 1;\n\n                }\n\n\n\n                var form = document.adminForm;\n                if(!form)\n                {\n                        form = document.mosForm;\n                }\n\n                if(form.content_type[2].checked === false)\n                {\n                        document.getElementById('hide_title_yes').disabled=false;\n                }\n                else\n                {\n                      document.getElementById('hide_title_no').click();\n                      hide_title = 0;\n                      document.getElementById('hide_title_yes').disabled=true;\n                }\n                if(id!=null)\n                {\n                        for (i=0; i<form.content_type.length; i++)\n                        {\n                                if (form.content_type[i].checked)\n                                {\n                                        var content_type = form.content_type[i].value;\n                                }\n                        }";
    //   if ( @include_once( JNEWSPATH_ADMIN . 'social' .DS. 'class.social.php' ) ) {
    if (!$GLOBALS[JNEWS . 'use_tags'] and class_exists('jNews_Social') or !$GLOBALS[JNEWS . 'use_tags'] and $GLOBALS[JNEWS . 'level'] > 2) {
        $js .= "\n                            if(changeType!=null)\n                                id = document.getElementById('insertbot').value;\n\n                            template = window.top.document.getElementById('template_id');\n                            templateid = template.value;\n\n                            var tag =  id;\n                            if(id != 0)\n                                getContent(id, content_type, url,templateid);\n\n                            form.contenttag.value = tag;\n                    }\n                    //if id == null\n                    else\n                    {\n                            var tag = form.contentreplace.value;";
        if (version_compare(JVERSION, '1.6.0', '<')) {
            //1.5
            $js .= " if(window.top.insertTag(tag)){window.top.document.getElementById('sbox-window').close();}";
        } else {
            if (version_compare(JVERSION, '3.0.0', '<')) {
                $js .= ' if(window.top.insertTag(tag)) {window.parent.SqueezeBox.close();}';
            } else {
                $js .= 'if(window.top.insertTag(tag))
                                        {
                                            var need_click = jQuery(window.top.document).find("div.modal-backdrop");
                                            if(need_click.length == 0) window.parent.SqueezeBox.close();
                                            else    jQuery(window.top.document).find("div.modal-backdrop").click();}';
            }
        }
        $js .= "}\n                      }";
    } else {
        $js .= "\n                                if(changeType==null)\n                                        form.botID.value= id;\n\n                                var tag = '{contentitem:' + form.botID.value + '|' + content_type +'|'+hide_title+ '}';\n\n                                form.contenttag.value = tag;\n                    }\n                    //if id -- null\n                    else\n                    {\n\n                                var tag = form.contenttag.value;";
        if (version_compare(JVERSION, '1.6.0', '<')) {
            //1.5
            $js .= " if(window.top.insertTag(tag)){window.top.document.getElementById('sbox-window').close();}";
        } else {
            if (version_compare(JVERSION, '3.0.0', '<')) {
                $js .= ' if(window.top.insertTag(tag)) {window.parent.SqueezeBox.close();}';
            } else {
                $js .= ' if(window.top.insertTag(tag)) {
                                                var need_click = jQuery(window.top.document).find("div.modal-backdrop");
                                                if(need_click.length == 0) window.parent.SqueezeBox.close();
                                                else    jQuery(window.top.document).find("div.modal-backdrop").click();}';
            }
        }
        $js .= "}\n                            }";
    }
    //end function
    if (version_compare(JVERSION, '1.6.0', '<')) {
        //1.5
        $js .= "\n\n \t\t\tfunction getContent(id, content_type, url, templateid){\n\n \t\t\t\tvar ajax = new Ajax(url,\n \t\t\t\t\t{data: 'artId='+id+'&content_type='+content_type+'&templateid='+templateid,\n \t\t\t\t\tmethod: 'POST',\n \t\t\t\t\tonComplete : function(result){insertContent(result, id); }\n \t\t\t\t\t}\n \t\t\t\t);\n \t\t\t\tajax.request();\n \t\t\t}";
    } else {
        $js .= "\n \t\t\tfunction getContent(id, content_type, url,templateid){\n\n\t\t\t\tvar ajax = new Request({\n\t\t\t\turl : url,\n\t\t\t\tdata: 'artId='+id+'&content_type='+content_type+'&templateid='+templateid,\n\t\t\t\tmethod: 'POST',\n\t\t\t\tonComplete : function(result){insertContent(result, id); }\n\t\t\t\t});\n\t\t\t\tajax.send();\n \t\t\t}";
    }
    $js .= "\n \t\t\tfunction insertContent(html, id){\n\t\t\t\tvar form = document.adminForm;\n\t\t\t\tif(!form){\n\t\t\t\t\tform = document.mosForm;\n\t\t\t\t}\n\n\t\t\t\tvar root = document.createElement('div');\n\n\t\t\t\troot.innerHTML = html;\n\t\t\t\tvar body = document.getElementsByTagName('body')[0].appendChild(root);\n\n\t\t\t\troot.setAttribute(\"style\", \"width:150px; display:none\");\n\t\t\t\tvar element = document.getElementById('artcontent_'+id);\n\n\t\t\t\tform.contentreplace.value = element.innerHTML;\n\n\t\t\t\tdocument.getElementsByTagName('body')[0].removeChild(root);\n\t\t\t}\n\t\t\t";
    $url = jNews_Tools::completeLink('option=' . JNEWS_OPTION . '&act=mailing&task=articleContent', false, false, true);
    $doc = JFactory::getDocument();
    $doc->addScriptDeclaration($js);
    ?>

    <style type="text/css">
        table.smartcontent {
            border: 1px solid #D5D5D5;
            background-color: #F6F6F6;
            width: 100%;
            margin-bottom: 10px;
            -moz-border-radius:3px;
            -webkit-border-radius:3px;
            padding: 5px;
        }
        table.smartcontent td.key {
            background-color: #f6f6f6;
            text-align: left;
            width: 140px;
            color: #666;
            font-weight: bold;
            border-bottom: 1px solid #e9e9e9;
            border-right: 1px solid #e9e9e9;
        }
    </style>
    <div id="element-box">
        <div class="t">
            <div class="t">
                <div class="t"></div>
            </div>
        </div>
        <div class="m">




    <!--<form name="adminForm" method="post" action="index.php?option=<?php 
    echo JNEWS_OPTION;
    ?>
&tmpl=component">-->
            <table class="smartcontent" width="100%"">
                   <tr>
                    <td width="185" class="key">
                        <span class="editlinktip">
                            <?php 
    $tip = _JNEWS_AUTONEWS_TYPE_TIPS;
    $title = _JNEWS_AUTONEWS_TYPE;
    echo jNews_Tools::toolTip($tip, '', 280, 'tooltip.png', $title, '', 0);
    ?>
                        </span>
                    </td>
                    <td style="vertical-align: top;">
                        <span class="editlinktip">
    <?php 
    $tip = _JNEWS_TITLE_ONLY_TIPS;
    $title = _JNEWS_TITLE_ONLY;
    $title_only = "<span class=\"editlinktip\">" . jNews_Tools::toolTip($tip, '', 280, 'tooltip.png', $title, '', 0) . "</span>";
    $tip = _JNEWS_INTRO_ONLY_TIPS;
    $title = _JNEWS_INTRO_ONLY;
    $intro_only = "<span class=\"editlinktip\">" . jNews_Tools::toolTip($tip, '', 280, 'tooltip.png', $title, '', 0) . "</span>";
    $tip = _JNEWS_FULL_ARTICLE_TIPS;
    $title = _JNEWS_FULL_ARTICLE;
    $full_article = "<span class=\"editlinktip\">" . jNews_Tools::toolTip($tip, '', 280, 'tooltip.png', $title, '', 0) . "</span>";
    //                                $tip =  _JNEWS_HIDE_TITTLE_ARTICLE_TIPS;
    //				$title =  _JNEWS_HIDE_TITLE ;
    //				$hide_title = "<span class=\"editlinktip\">" . jNews_Tools::toolTip( $tip, '', 280, 'tooltip.png', $title, '', 0 ) . "</span>";
    ?>
                        </span>
                        <span class="editlinktip">
                            <input id="content_type" type="radio" name="content_type" value="0" checked="checked" onclick="setContentTag(1,'<?php 
    echo $url;
    ?>
', 0);"/><?php 
    echo $full_article;
    ?>
                            <input id="content_type" type="radio" name="content_type" value="1" onclick="setContentTag(1, '<?php 
    echo $url;
    ?>
', 1);"/><?php 
    echo $intro_only;
    ?>
                            <input id="content_type" type="radio" name="content_type" value="2" onclick="setContentTag(1, '<?php 
    echo $url;
    ?>
', 2);"/><?php 
    echo $title_only;
    ?>
                            <!--<input id="content_type" type="radio" name="content_type" value="3" onclick="setContentTag(1, '<?php 
    //echo $url
    ?>
', 3);"/><?php 
    //echo $hide_title;
    ?>
-->
                        </span>

                    </td>
                    <td rowspan="2">
                        <input onclick="setContentTag(null,'<?php 
    echo $url;
    ?>
')" class="inserttag" type="button" label="Insert Content" name="Insert Content" value="Insert Content"/>
                    </td>
                </tr>

                <tr>
                    <td width="185" class="key">
                        <span class="editlinktip">
    <?php 
    $tip = _JNEWS_CONTENT_TIP;
    $title = _JNEWS_CONTENT_ID;
    echo jNews_Tools::toolTip($tip, '', 280, 'tooltip.png', $title, '', 0);
    ?>
                        </span>
                    </td>
                    <td style="vertical-align: top;">
                                    <!--  <input type="text" onchange="setCaptionTags();" size="60px" name="jnewstagcaption"> -->
                        <input id="insertbot" type="text" size="20px" name="contenttag" value="0"/>
                    </td>
                </tr>
                <tr>
                    <td colspan="2">
                        <input id="insertbot" type="hidden" size="60px" name="contentreplace" />
                    </td>
                </tr>
                <tr>
                    <td colspan="2">
                        <input id="botID" size="10px" name="botID" value="0" type="hidden"/>
                    </td>
                </tr>


                <tr>
                    <td width="185" class="key">
                        <span class="editlinktip">
                    <?php 
    $tip = _JNEWS_HIDE_TITTLE_ARTICLE_TIPS;
    $title = _JNEWS_HIDE_TITLE;
    echo jNews_Tools::toolTip($tip, '', 280, 'tooltip.png', $title, '', 0);
    ?>
                        </span>
                    </td>
                    <td style="vertical-align: top;">
                        <input id="hide_title_no" onclick="setContentTag(1, '<?php 
    echo $url;
    ?>
', 2, 0);" type="radio" name="hide_title" value="0" checked="checked" /><?php 
    echo 'No';
    ?>
                        <input id="hide_title_yes" onclick="setContentTag(1, '<?php 
    echo $url;
    ?>
', 2, 1);" type="radio" name="hide_title" value="1" /><?php 
    echo 'Yes';
    ?>

                    </td>
                </tr>
            </table>
            <div id="element-box">
                <div class="t">
                    <div class="t">
                        <div class="t"></div>
                    </div>
                </div>
                <div class="m" style="position:relative;">
                                    <?php 
    echo jnews::setTop($toSearch, null);
    $select_cat = version_compare(JVERSION, '1.6.0', '<') ? 'SELECT CATEGORY' : 'JOPTION_SELECT_CATEGORY';
    ?>
                    <div style="position:absolute;top:5px; left:55%;">
                    <?php 
    $sort_select = JRequest::getVar('filter_category_id', '', 'POST', 'int');
    ?>
                        <select name="filter_category_id" class="inputbox" onchange="this.form.submit()">
                            <option value=""><?php 
    echo JText::_($select_cat);
    ?>
</option>
                            <?php 
    if (version_compare(JVERSION, '1.6.0', '<')) {
        echo getCatListFromJoomla15($sort_select);
    } else {
        echo JHtml::_('select.options', JHtml::_('category.options', 'com_content'), 'value', 'text', $sort_select);
    }
    ?>
                        </select>
                    </div>
<!--                          border: 1px solid #CCCCCC;-->
                    <table class="joobilist" cellpadding="0" cellspacing="0">
                        <tbody>
                        <thead>
                            <tr>
                                <th class="title">
                                      <?php 
    if ($setSort->orderDir == 'asc') {
        $new_sort = "desc";
    } else {
        $new_sort = "asc";
    }
    ?>
                                                <a class="hasTip" title="" onclick="Joomla.tableOrdering('a.title','<?php 
    echo $new_sort;
    ?>
', 'content');" href="#">
                                                    <?php 
    echo JText::_(_JNEWS_TAGPICKLIST_TITLE);
    ?>
                                                    <?php 
    if ($setSort->orderValue == 'a.title') {
        ?>
<i class="icon-arrow-<?php 
        echo $new_sort == "asc" ? "up" : "down";
        ?>
"></i><?php 
    }
    ?>
                                                </a>
    <?php 
    //echo _JNEWS_TAGPICKLIST_TITLE;
    // echo jnews::HTML_GridSort(_JNEWS_TAGPICKLIST_TITLE, 'a.title', $setSort->orderDir, $setSort->orderValue);
    ?>
                                </th>
                                <th width="80px" class="title">
                        <?php 
    //echo _JNEWS_TAG_ARTICLESECTION;
    if (version_compare(JVERSION, '1.6.0', '<')) {
        //j15
        echo jnews::HTML_GridSort(_JNEWS_TAG_ARTICLESECTION, 'b.title', $setSort->orderDir, $setSort->orderValue);
    } else {
        ?>

                              <?php 
        if ($setSort->orderDir == 'asc') {
            $new_sort = "desc";
        } else {
            $new_sort = "asc";
        }
        ?>
                                    <a class="hasTip" title="" onclick="Joomla.tableOrdering('c.title_2','<?php 
        echo $new_sort;
        ?>
', 'content');" href="#">
                                        <?php 
        echo JText::_(_JNEWS_TAG_ARTICLESECTION);
        ?>
                                         <?php 
        if ($setSort->orderValue == 'c.title_2') {
            ?>
<i class="icon-arrow-<?php 
            echo $new_sort == "asc" ? "up" : "down";
            ?>
"></i><?php 
        }
        ?>
                                    </a>

<!--                            echo jnews::HTML_GridSort(_JNEWS_TAG_ARTICLESECTION, 'b.title', $setSort->orderDir, $setSort->orderValue);-->
                        <?php 
    }
    ?>
                                </th>
                                <th width="80px" class="title">
                                <?php 
    if ($setSort->orderDir == 'asc') {
        $new_sort = "desc";
    } else {
        $new_sort = "asc";
    }
    ?>
                                    <a class="hasTip" title="" onclick="Joomla.tableOrdering('c.title','<?php 
    echo $new_sort;
    ?>
', 'content');" href="#">
                                        <?php 
    echo JText::_(_JNEWS_TAG_ARTICLECATEGORY);
    ?>
                                         <?php 
    if ($setSort->orderValue == 'c.title') {
        ?>
<i class="icon-arrow-<?php 
        echo $new_sort == "asc" ? "up" : "down";
        ?>
"></i><?php 
    }
    ?>
                                    </a>
                    <?php 
    //echo _JNEWS_TAG_ARTICLECATEGORY;
    // echo jnews::HTML_GridSort(_JNEWS_TAG_ARTICLECATEGORY, 'c.title', $setSort->orderDir, $setSort->orderValue);
    ?>
                                </th>
                                <th width="30px" class="title">
                                    <?php 
    if ($setSort->orderDir == 'asc') {
        $new_sort = "desc";
    } else {
        $new_sort = "asc";
    }
    ?>
                                        <a class="hasTip" title="" onclick="Joomla.tableOrdering('a.id','<?php 
    echo $new_sort;
    ?>
', 'content');" href="#">
                                            ID
                                             <?php 
    if ($setSort->orderValue == 'a.id') {
        ?>
<i class="icon-arrow-<?php 
        echo $new_sort == "asc" ? "up" : "down";
        ?>
"></i><?php 
    }
    ?>
                                        </a>
                                        <?php 
    //echo jnews::HTML_GridSort('ID', 'a.id', $setSort->orderDir, $setSort->orderValue, 'task');
    ?>
                                </th>
                            </tr>
                        </thead>
    <?php 
    if (sizeof($contentItems) > 0) {
        $k = 0;
        foreach ($contentItems as $contentItem) {
            if (empty($contentItem->section)) {
                $contentItem->section = JText::_('Uncategorised');
            }
            if (empty($contentItem->category)) {
                $contentItem->category = JText::_('Uncategorised');
            }
            echo '<tr style="cursor:pointer" class="row' . $k . '" onclick="setContentTag(\'' . $contentItem->id . '\',\'' . $url . '\');" ><td>' . $contentItem->title . '</td><td nowrap="nowrap" align="center">' . $contentItem->section . '</td><td nowrap="nowrap" align="center">' . $contentItem->category . '</td><td nowrap="nowrap" align="center">' . $contentItem->id . '</td></tr>';
            //echo '<tr style="cursor:pointer" class="row'.$k.'" onclick="setContentTag(\''.$contentItem->id.'\',\''.$url.'\');" ><td>'.$contentItem->title.'</td><td nowrap="nowrap" align="center">'.$contentItem->section.'</td><td nowrap="nowrap" align="center">'.$contentItem->category.'</td><td nowrap="nowrap" align="center">'.$contentItem->id.'</td></tr>';
            $k = 1 - $k;
        }
    }
    ?>
                        </tbody>
                    </table>
    <?php 
    echo jnews::setPaginationBot($setLimit, 'margin:auto;');
    ?>
                    <input type="hidden" value="<?php 
    echo JNEWS_OPTION;
    ?>
" name="option"/>
                    <input type="hidden" value="<?php 
    echo $action;
    ?>
" name="act"/>
                    <input type="hidden" value="<?php 
    echo $task;
    ?>
" name="task"/>
                    <input type="hidden" value="<?php 
    echo $setSort->orderValue;
    ?>
" name="c_filter_order"/>
                    <input type="hidden" value="<?php 
    echo $setSort->orderValue;
    ?>
" name="filter_order"/>
                    <input type="hidden" value="<?php 
    echo $setSort->orderDir;
    ?>
" name="filter_order_Dir"/>
                    </form>
                </div>
                <div class="b">
                    <div class="b">
                        <div class="b"></div>
                    </div>
                </div>
            </div>
        </div>
        <div class="b">
            <div class="b">
                <div class="b"></div>
            </div>
        </div>
    </div>
    <?php 
    $return = ob_get_contents();
    ob_end_clean();
    return array(_JNEWS_CONTENT_ITEM, $return);
}
Ejemplo n.º 9
0
    public static function import($action, $lists, $listId)
    {
        ?>
		<script language="javascript" type="text/javascript">
			function submitbutton(pressbutton) {
				var form = document.adminForm;


				if (form.importfile.value == "") {
					alert( "<?php 
        echo addslashes(_JNEWS_SELECT_FILE) . ' ' . addslashes(_JNEWS_MENU_IMPORT) . '!';
        ?>
" );
				} else {
					submitform(pressbutton);
				}
			}
		</script>
		<form action="index.php?option=<?php 
        echo JNEWS_OPTION;
        ?>
&act=<?php 
        echo $action;
        ?>
&listid=<?php 
        echo $listId;
        ?>
" method="post" name="adminForm" enctype="multipart/form-data" id="adminForm">
			<input type="hidden" name="task" value="<?php 
        $task = JRequest::getVar('task', 'import');
        echo $task;
        ?>
" />
			<input type="hidden" name="action" value="<?php 
        echo $action;
        ?>
" />
		<table border="0" width="100%" cellpadding="1" cellspacing="1" class="<?php 
        echo jnews::myTheme();
        ?>
">
			<tbody>
		<?php 
        if (!$GLOBALS[JNEWS . 'disabletooltip']) {
            if (version_compare(JVERSION, '3.0.0', '<')) {
                JHTML::_('behavior.tooltip');
            } else {
                JHtml::_('behavior.tooltip');
            }
        }
        echo _JNEWS_LIST_IMPORT;
        $i = 0;
        $k = 0;
        foreach ($lists as $list) {
            $i++;
            echo '<tr class=row' . $k . '><td width="40px">';
            echo "\n" . '<input type="checkbox" class="inputbox" value="1" name="subscribed[' . $i . ']" />';
            echo "\n" . '<input type="hidden" name="sub_list_id[' . $i . ']" value="' . $list->id . '" />';
            echo '</td><td>';
            echo "\n" . '<span class="aca_list_name  onclick=\'return false;\'">' . jNews_Tools::toolTip($list->list_desc, $list->list_name, '', '', $list->list_name, '#', 1) . '</span>';
            echo "\n" . '<input type="hidden" name="acc_level[' . $i . ']" value="0" />';
            echo '</td></tr>';
            $k = 1 - $k;
        }
        ?>
		<tr>
			<td colspan="2">
				<br/>
				<?php 
        echo _JNEWS_IMPORTSUB_TIPS;
        ?>
				<div style="border: 1px solid #D5D5D5; padding: 5px; margin: 2px; background-color: #F9F9F9">
					<?php 
        echo _JNEWS_SELECT_IMPORT_FILE . ' :';
        ?>
					<input type="file" name="importfile" size="57" class="inputbox" />
					<input type="button" value="Import" class="button" onclick="submitbutton('doImport')" />
				</div>
			</td>
		</tr>
	</table>
<?php 
        if (version_compare(JVERSION, '3.0.0', '<')) {
            echo JHTML::_('form.token');
        } else {
            echo JHtml::_('form.token');
        }
        ?>
	</form><?php 
    }
Ejemplo n.º 10
0
/**
 * <p>Function to insert a module tag<p>
 * @param string $forms - the start html form
 * @param object $params - the plugin parameters
 */
function tagsite($forms, $params = null)
{
    $limit = -1;
    $action = JRequest::getVar('act', '', '', 'WORD');
    $task = JRequest::getVar('task');
    echo $forms['main'];
    $customlink = trim($params->get('customlink'));
    $customlinkA = array();
    if (!empty($customlink)) {
        $customlinkA = explode(',', $customlink);
    }
    $countParams = count($customlinkA);
    ?>
<style type="text/css">
	table.sitetaginput {
		border: 1px solid #D5D5D5;
		background-color: #F6F6F6;
		width: 100%;
		margin-bottom: 10px;
		-moz-border-radius:3px;
 		-webkit-border-radius:3px;
 		padding: 5px;
 	}
 	table.sitetaginput td.key {
 		background-color: #f6f6f6;
		text-align: left;
		width: 140px;
		color: #666;
		font-weight: bold;
		border-bottom: 1px solid #e9e9e9;
		border-right: 1px solid #e9e9e9;
 	}
	div.sitetaglist {
		border-spacing:1px;
		border:3px double #D5D5D5;
		padding: 5px;
		margin-bottom: 5px;
		cursor: pointer;
	}
 	div.k0 {
		background-color:#f4f4ff;
		color:#666;
	}
	div.k0:hover, div.k1:hover{
		background-color:#CFF;
		color:#666;
	}
	div.k1 {
		background-color:#FFF;
		color:#666;
	}
	div.k1:hover, div.k1:hover{
		background-color:#CFF;
		color:#666;
	}

	div.selectedtag {
		background-color:#87c331;
		color:#FFF;
		font-weight:bold;
	}

	table.sitetaginput tr.inputhide {
		display: none;
	}

	table.sitetaginput tr.inputunhide {
		display: table-row;
	}
 </style>
<div id="element-box">
	<div class="t">
		<div class="t">
			<div class="t"></div>
		</div>
	</div>
<div class="m">
	<?php 
    $js = 'function insertjnewstag(tag){';
    if (version_compare(JVERSION, '1.6.0', '<')) {
        //1.5
        $js .= ' if(window.top.insertTag(tag)){window.top.document.getElementById(\'sbox-window\').close();}';
    } else {
        if (version_compare(JVERSION, '3.0.0', '<')) {
            $js .= ' if(window.top.insertTag(tag)) {window.parent.SqueezeBox.close();}';
        } else {
            $js .= ' if(window.top.insertTag(tag)) {           
                     var need_click = jQuery(window.top.document).find("div.modal-backdrop");
                    if(need_click.length == 0) window.parent.SqueezeBox.close();
                    else    jQuery(window.top.document).find("div.modal-backdrop").click();}';
        }
    }
    $js .= '}';
    $script = 'function setCaption(newtag){window.document.getElementById(\'jnewstag\').value = newtag}';
    $doc = JFactory::getDocument();
    $doc->addScriptDeclaration($js);
    ?>
	<script language="javascript" type="text/javascript">
	 function jNewsTagInsert(tag, id) {
		var form = document.adminForm;
		if(!form){
			form = document.mosForm;
		}
		form.jnewstag.value = tag;
		form.jnewsselecttag.value = id;
		document.getElementById('tagvisibility').className = 'inputunhide';
		document.getElementById(id).className = 'selectedtag sitetaglist';
	 	switch(id){
	 		case 'divviewonline':
	 			form.jnewstagcaption.value = '<?php 
    echo _JNEWS_TAG_VIEWONLINE;
    ?>
';
		 		document.getElementById('divfwdtofriend').className = 'k1 sitetaglist';
				<?php 
    for ($a = 0; $a <= count($customlinkA); $a++) {
        ?>
				document.getElementById('div<?php 
        echo 'site' . $a;
        ?>
').className = 'k<?php 
        $x = $a % 2;
        echo $x;
        ?>
 sitetaglist';
				<?php 
    }
    ?>
		 		break;
		 	case 'divfwdtofriend':
		 		form.jnewstagcaption.value = '<?php 
    echo _JNEWS_TAG_FWDTOFRIEND;
    ?>
';
				document.getElementById('divviewonline').className = 'k1 sitetaglist';
				<?php 
    for ($b = 0; $b <= $countParams; $b++) {
        ?>
				document.getElementById('div<?php 
        echo 'site' . $b;
        ?>
').className = 'k<?php 
        $x = $b % 2;
        echo $x;
        ?>
 sitetaglist';
				<?php 
    }
    ?>
		 		break;
		 	<?php 
    for ($c = 0; $c <= $countParams; $c++) {
        ?>
			case 'div<?php 
        echo 'site' . $c;
        ?>
':
				form.jnewstagcaption.value = '<?php 
        if (isset($customlinkA[$c])) {
            if (substr_count($customlinkA[$c], '|') == 1) {
                $linkCaption = explode('|', $customlinkA[$c]);
                echo $linkCaption[0];
            }
        }
        ?>
';
				document.getElementById('divviewonline').className = 'k0 sitetaglist';
				document.getElementById('divfwdtofriend').className = 'k1 sitetaglist';
				<?php 
        $tagA = $customlinkA;
        for ($ci = 0; $ci <= count($tagA); $ci++) {
            if ($c != $ci) {
                ?>
				document.getElementById('divsite<?php 
                echo $ci;
                ?>
').className = 'k<?php 
                $x = $ci % 2;
                echo $x;
                ?>
 sitetaglist';
				<?php 
            }
        }
        ?>
				break;
			<?php 
    }
    ?>
		 	default:
		 		document.getElementById('divviewonline').className = 'k0 sitetaglist';
				document.getElementById('divfwdtofriend').className = 'k1 sitetaglist';
				<?php 
    for ($d = 0; $d <= $countParams; $d++) {
        ?>
				document.getElementById('divsite<?php 
        echo $d;
        ?>
').className = 'k<?php 
        $x = $d % 2;
        echo $x;
        ?>
 sitetaglist';
				<?php 
    }
    ?>
	 	}
	}


	function setCaptionTags() {
		var form = document.adminForm;
		if(!form){
			form = document.mosForm;
		}
		var selectedtag = form.jnewsselecttag.value;
		if (selectedtag == 'divviewonline'){
			form.jnewstag.value = '{tag:viewonline name='+form.jnewstagcaption.value+' theme='+form.jnewstagtheme.value+'}';
		}
		if (selectedtag == 'divfwdtofriend'){
			form.jnewstag.value = '{tag:fwdtofriend name='+form.jnewstagcaption.value+' theme='+form.jnewstagtheme.value+'}';
		}
		<?php 
    for ($e = 0; $e <= $countParams; $e++) {
        if (isset($customlinkA[$e])) {
            if (substr_count($customlinkA[$e], '|') == 1) {
                $tagCaption = explode('|', $customlinkA[$e]);
                ?>
			if (selectedtag == 'divsite<?php 
                echo $e;
                ?>
'){
				form.jnewstag.value = '{tagsite:'+form.jnewstagcaption.value+'|<?php 
                echo $tagCaption[1];
                ?>
}';
			}
		<?php 
            }
        }
    }
    ?>
	}
	</script>
	<table class="sitetaginput" width="100%"">
			<tbody>
				<tr id="tagvisibility" class="inputhide">
					<td width="80" class="key">
						<span class="editlinktip">
						<?php 
    $tip = _JNEWS_TAGSITE_TAGTIP;
    $title = _JNEWS_MAILING_TAG;
    echo jNews_Tools::toolTip($tip, '', 280, 'tooltip.png', $title, '', 0);
    ?>
						</span>
					</td>
					<td>
						<input type="text" name="jnewstag" class="inputbox" size="60px">
					</td>
				</tr>
				<tr style="display:visible;">
					<td width="80" class="key">
						<span class="editlinktip">
						<?php 
    $title = _JNEWS_TAGSITE_THEME;
    $tip = _JNEWS_TAGSITE_THEME_TIPS;
    echo jNews_Tools::toolTip($tip, '', 280, 'tooltip.png', $title, '', 0);
    ?>
						</span>
					</td>
					<td>
						<?php 
    $themeOption = array();
    $themeOption[] = jnews::HTML_SelectOption('0', 'Joomla Page');
    $themeOption[] = jnews::HTML_SelectOption('1', 'Standalone newsletter');
    echo jnews::HTML_GenericList($themeOption, "jnewstagtheme", 'onchange="setCaptionTags();" class="inputbox" size="1"', 'value', 'text', '0');
    ?>
					</td>
				</tr>
				<tr style="display:visible;">
					<td width="80" class="key">
						<span class="editlinktip">
						<?php 
    $tip = _JNEWS_TAGSITE_CAPTIONTIP;
    $title = _JNEWS_TAGSITE_CAPTION;
    echo jNews_Tools::toolTip($tip, '', 280, 'tooltip.png', $title, '', 0);
    ?>
						</span>
					</td>
					<td>
						<input type="text" onchange="setCaptionTags();" size="60px" name="jnewstagcaption">
						<input type="hidden" size="60px" name="jnewsselecttag">
					</td>
				</tr>
				<tr style="display:visible;">
					<td width="80" class="key">
						<span class="editlinktip">
						<?php 
    echo ' ';
    ?>
						</span>
					</td>
					<td>
						<input type="button" style="font-weight:bold;font-size:1.2em;" value="<?php 
    echo _JNEWS_TAG_INSERT_TAG;
    ?>
" onclick="insertjnewstag(form.jnewstag.value);" class="joobibutton">
					</td>
				</tr>
			</tbody>
		</table>

	<div id="divviewonline" class="k0 sitetaglist" onclick="jNewsTagInsert('{tag:viewonline name=<?php 
    echo _JNEWS_TAG_VIEWONLINE;
    ?>
}', 'divviewonline');">Insert a "VIEW IT ONLINE" link in your e-mail</div>
	<div id="divfwdtofriend" class="k1 sitetaglist" onclick="jNewsTagInsert('{tag:fwdtofriend name=<?php 
    echo _JNEWS_TAG_FWDTOFRIEND;
    ?>
}', 'divfwdtofriend');">Insert a "FORWARD TO A FRIEND" link in your e-mail</div>
	<?php 
    $k = 0;
    foreach ($customlinkA as $customlinkOne) {
        //check if | exist
        if (substr_count($customlinkOne, '|') == 1) {
            $customlinkOneA = explode('|', $customlinkOne);
            ?>
		<div id="divsite<?php 
            echo $k;
            ?>
" class="k<?php 
            echo $k % 2;
            ?>
 sitetaglist" onclick="jNewsTagInsert('{tagsite:<?php 
            echo $customlinkOneA[0];
            ?>
|<?php 
            echo $customlinkOneA[1];
            ?>
}', 'divsite<?php 
            echo $k;
            ?>
');">Insert "<?php 
            echo $customlinkOneA[0];
            ?>
" link in your e-mail</div>
	<?php 
            $k++;
        }
    }
    ?>

	</div>
	<div class="b">
		<div class="b">
			<div class="b"></div>
		</div>
	</div>
</div>
	<input type="hidden" value="<?php 
    echo JNEWS_OPTION;
    ?>
" name="option"/>
	<input type="hidden" value="<?php 
    echo $action;
    ?>
" name="act"/>
	<input type="hidden" value="<?php 
    echo $task;
    ?>
" name="task"/>
  	</form>
<?php 
}
Ejemplo n.º 11
0
 public static function miseEnHTML($title, $tip, $compoment)
 {
     $html = '<tr>' . "\n\r";
     $html .= ' <td width="185" class="key">' . "\n\r";
     $html .= '  <span class="editlinktip">' . "\n\r";
     $html .= jNews_Tools::toolTip($tip, '', 280, 'tooltip.png', $title, '', 0);
     $html .= '  </span>' . "\n\r";
     $html .= ' </td>' . "\n\r";
     $html .= ' <td>' . $compoment . ' ' . "\n\r";
     $html .= ' </td>' . "\n\r";
     $html .= '</tr>' . "\n\r";
     return $html;
 }
Ejemplo n.º 12
0
 function _showSubscriberLists($user, $subscriber, $lists, $queues, $frontEnd, $accessAdmin)
 {
     $Itemid = JRequest::getInt('Itemid');
     $tabparams = $this->_memGetTabParameters($user);
     if (!empty($lists)) {
         $br = "\n\r";
         $html = '<fieldset class="jnewscss" style="padding: 4px; text-align: left">' . $br;
         $html .= '<legend><strong>' . _JNEWS_SUBSCRIPTIONS . '</strong></legend>' . $br;
         $html .= '<table width="100%"  border="0" cellspacing="0" cellpadding="4" class="adminlist">' . $br;
         $html .= '<tr><th class="title">#</th>' . $br;
         $html .= '<th class="title">' . _JNEWS_LIST_NAME . '</th>' . $br;
         $html .= '<th class="title" style="text-align: center;">' . _JNEWS_LIST_T_SUBSCRIPTION . '</th>' . $br;
         if ($tabparams['show_archive']) {
             $html .= '<th class="title" style="text-align: center;">' . _JNEWS_VIEW_ARCHIVE . '</th>' . $br;
         }
         $html .= '</tr>' . $br;
         $subscribed = '';
         $i = 0;
         foreach ($lists as $list) {
             $i++;
             $subscribed = 0;
             if (!empty($queues)) {
                 foreach ($queues as $queue) {
                     if ($queue->list_id == $list->id) {
                         $subscribed = 1;
                     }
                 }
             }
             if (!empty($tabparams['jnews_itemid'])) {
                 $item_id = $tabparams['jnews_itemid'];
             } else {
                 $item_id = $Itemid;
             }
             $html .= '<tr><td>' . $i . '</td><td>' . $br;
             $link = ($list->hidden and ($list->list_type == '1' or $list->list_type == '7') and $GLOBALS[JNEWS . 'show_archive']) ? 'index.php?option=' . JNEWS_OPTION . '&act=mailing&task=archive&listid=' . $list->id . '&Itemid=' . $item_id : '#';
             $html .= '<span class="aca_letter_names"';
             if ($link == "#") {
                 $html .= " onclick='return false;' ";
             }
             $html .= '>' . jNews_Tools::toolTip($list->list_desc, $list->list_name, '', '', $list->list_name, $link, 1) . ' </span>' . $br;
             $html .= '</td><td style="text-align: center;">' . $br;
             if ($subscribed == 1) {
                 $html .= _CMN_YES;
             }
             if ($subscribed == 0) {
                 $html .= _CMN_NO;
             }
             $html .= '</td>' . $br;
             if ($tabparams['show_archive'] && ($list->list_type == 1 or $list->list_type == 7)) {
                 $link = 'option=' . JNEWS_OPTION . '&act=mailing&listid=' . $list->id . '&listype=' . $list->list_type . '&task=archive&Itemid=' . $item_id;
                 $link = jNews_Tools::completeLink($link, false);
                 $img = 'move_f2.png';
                 $html .= '<td height="20" style="text-align: center;">';
                 $html .= '<a href="' . $link . '" >' . "\n\r";
                 $html .= '<img src="' . JNEWS_JPATH_LIVE . '/components/' . JNEWS_OPTION . '/images/' . $img . '" width="20" height="20" border="0" alt="' . _JNEWS_VIEW_ARCHIVE . '" /></a></td>' . "\n\r";
             } elseif ($tabparams['show_archive']) {
                 $html .= '<td height="20"><center>-</center></td>' . "\n\r";
             }
         }
         $html .= '<tr></table></fieldset>';
         return $html;
     }
 }
Ejemplo n.º 13
0
    public static function _attachment($thumbnail)
    {
        $display = '<script src="' . JNEWS_URL_INCLUDES . 'multifile.js"></script>
			<input id="my_file_element" type="file" name="file_1" > </input>

			<br /><b>' . _JNEWS_FILES . ':</b>

			<div id="files_list"></div>
			<script>

				var multi_selector = new MultiSelector( document.getElementById( "files_list" ), 1 );
				multi_selector.addElement( document.getElementById( "my_file_element" ) );
			</script>';
        if (!empty($thumbnail)) {
            //$path = JNEWS_PATH_ADMIN_THUMBNAIL_SHOW. $thumbnail;
            $path = $thumbnail;
            $img = jnews::imageResize($path, '200', '200', $thumbnail);
            $display .= '<br>' . $img;
            $display .= '<br>' . jNews_Tools::toolTip($img, $thumbnail, '', '', $thumbnail);
        }
        return $display;
    }
Ejemplo n.º 14
0
    public static function queueSettings($lists)
    {
        ?>
	<fieldset class="jnewscss">
		<legend><?php 
        echo _JNEWS_CRON_FSETTINGS;
        ?>
</legend>
		<table class="jnewstable" cellspacing="1">
			<tbody>
				<tr>
					<td width="185" class="key">
						<span>
							<?php 
        echo jNews_Tools::toolTip(_JNEWS_SHOW_CRON_TIPS, '', 280, 'tooltip.png', _JNEWS_SHOW_CRON, '', 0);
        ?>
						</span>
					</td>
					<td>
						<?php 
        echo $lists['j_cron'];
        if ($GLOBALS[JNEWS . 'j_cron'] == 1) {
            $img = '16/status_g.png';
            $alt = 'Published';
        } else {
            $img = '16/status_r.png';
            $alt = 'Unpublished';
        }
        ?>
					</td>
				</tr>

				<tr>
					<td colspan="2">
						<?php 
        echo _JNEWS_YOUR_CRON;
        echo '<br><b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;' . JNEWS_JPATH_LIVE . '/index.php?option=' . JNEWS_OPTION . '&act=cron</b> ';
        if ($GLOBALS[JNEWS . 'j_cron']) {
            $alink = JNEWS_JPATH_LIVE . '/index.php?option=' . JNEWS_OPTION . '&act=cron';
        } else {
            $alink = '#';
        }
        ?>
<?if($GLOBALS[JNEWS.'j_cron']){
				?>
						<a href="<?php 
        echo $alink;
        ?>
" TARGET="_NEW">
						<?php 
        echo _JNEWS_LAUNCH_CRON;
        ?>
</a>
					</td>
				</tr>
				<?}
				?>
			</tbody>
		</table>
	</fieldset>
	<!--<fieldset class="jnewscss">
		<legend><?php 
        //echo _JNEWS_Q_PROCESS
        ?>
</legend>
			<table class="jnewstable" cellspacing="1">
				<tbody>
					<tr>
						<td width="185" class="key">
							<span class="editlinktip">
							<?php 
        //echo jNews_Tools::toolTip( 'Enter the maximum number of emails to be processed per batch', '', 280, 'tooltip.png', _JNEWS_MAX_Q, '', 0 );
        ?>
							</span>
						</td>
						<td>
							<input class="inputbox" type="text" name="config['max_queue']" size="20" value="<?php 
        echo $GLOBALS[JNEWS . 'max_queue'];
        ?>
">
						</td>
					</tr>
					<tr>
						<td width="185" class="key">
							<span class="editlinktip">
							<?php 
        //echo jNews_Tools::toolTip( 'Maximum number of attempts to send the queue', '', 280, 'tooltip.png', 'Maximum number of attempts', '', 0 );
        ?>
							</span>
						</td>
						<td>
							<input class="inputbox" type="text" name="config['max_attempts']" size="20" value="<?php 
        echo $GLOBALS[JNEWS . 'max_attempts'];
        ?>
">
						</td>
					</tr>
				</tbody>
			</table>

	</fieldset>
	-->
	<!--
	<fieldset class="jnewscss">
		<legend><?php 
        //echo 'Newsletter Priority'
        ?>
</legend>
			<table class="jnewstable" cellspacing="1">
				<tbody>
					<tr>
						<td width="185" class="key">
							<span class="editlinktip">
							<?php 
        //echo jNews_Tools::toolTip( 'Choose the priority for scheduled Newsletters', '', 280, 'tooltip.png', 'Scheduled Newsletter', '', 0 );
        ?>
							</span>
						</td>
						<td>
							<?php 
        //echo $lists['sched_prior'];
        ?>
						</td>
					</tr>
					<tr>
						<td width="185" class="key">
							<span class="editlinktip">
							<?php 
        //echo jNews_Tools::toolTip( 'Choose the priority for auto-responders', '', 280, 'tooltip.png', 'Auto-responder', '', 0 );
        ?>
							</span>
						</td>
						<td>
							<?php 
        //echo $lists['ar_prior'];
        ?>
						</td>
					</tr>
					<tr>
						<td width="185" class="key">
							<span class="editlinktip">
							<?php 
        //echo jNews_Tools::toolTip( 'Choose the priority for smart-newsletters', '', 280, 'tooltip.png', 'Smart-Newsletter', '', 0 );
        ?>
							</span>
						</td>
						<td>
							<?php 
        //echo $lists['sm_prior'];
        ?>
						</td>
					</tr>
				</tbody>
			</table>

	</fieldset>-->
	<!--end queueSettings-->
	<?php 
    }