function showSubscribers($option) { global $mainframe; $database =& JFactory::getDBO(); require JPATH_SITE . "/administrator/components/com_vemod_news_mailer/config.vemod_news_mailer.php"; # Do the main database query $database->setQuery("SELECT * FROM #__categories WHERE (published=1 AND section REGEXP '^[0-9]+\$') ORDER BY section, ordering"); $rows = $database->loadObjectList(); if ($database->getErrorNum()) { echo $database->stderr(); return false; } $checked = explode(",", $vmncats); $database->setQuery("SELECT * FROM #__sections WHERE published=1 ORDER BY ordering"); $srows = $database->loadObjectList(); if ($database->getErrorNum()) { echo $database->stderr(); return false; } $schecked = explode(",", $vmnsecs); ?> <script language="javascript" type="text/javascript"> function submitbutton(pressbutton) { var form = document.adminForm; if (pressbutton == "back") { submitform( "controlpanel" ); return; } submitform( pressbutton ); } </script> <form action="index2.php" method="post" name="adminForm" id="adminForm"> <table cellpadding="4" cellspacing="0" border="0" width="100%"> <tr> <td width="100%" class="sectionname" align="center"><img src="components/com_vemod_news_mailer/vemod.jpg" align="middle" /></td> </tr> <tr> <td width="100%" class="sectionname" align="center">Manage subscribers</td> </tr> </table> <?php ?> <table cellpadding="4" cellspacing="0" border="0" width="100%" class="adminlist"> <tr> <th align="left" width="25">#</th> <th align="left" width="25">Id</th> <th align="left" width="25"></th> <th width="240" align="left">Categories that allows subscription</th> <th align="left" width="240">Frontend description</th> <th align="left" width="80">Subscribers</th> <th align="left">Manage subscribers</th> </tr> <?php $k = 0; $fdescription = unserialize(stripslashes(@$frontdescription)); for ($i = 0; $i < count($rows); $i++) { $row = $rows[$i]; $database->setQuery("SELECT COUNT(*) FROM #__vemod_news_mailer_subs WHERE catid={$row->id}"); $subcount = $database->loadResult(); ?> <tr class="<?php echo "row{$k}"; ?> "> <td align="center"><?php echo $i + 1; ?> </td> <td><?php echo $row->id; ?> </td> <td> <?php if (count($checked)) { echo in_array($row->id, $checked, TRUE) ? '<img src="images/publish_g.png" />' : '<img src="images/publish_x.png" />'; } ?> </td> <td><?php echo $row->title . ' (In section: ' . sectionTitle($srows, $row) . ')'; ?> </td> <td align="left"><?php echo $fdescription[$row->id]; ?> </td> <td align"center"><?php echo $subcount; ?> </td> <td align="left"><input name="editcategory[]" type="button" onClick="this.form.editcatid.value='<?php echo $row->id; ?> ';submitbutton('editsubscribers')" value="Subscribers"></td> </tr> <?php $k = 1 - $k; } ?> </table> <table cellpadding="4" cellspacing="0" border="0" width="100%" class="adminlist"> <tr> <th width="25">#</th> <th align="left" width="25">Id</th> <th align="left" width="25"></th> <th width="240" align="left">Sections that allows subscription</th> <th align="left" width="240">Frontend description</th> <th align="left" width="80">Subscribers</th> <th align="left">Manage subscribers</th> </tr> <?php $k = 0; $sfdescription = unserialize(stripslashes(@$sfrontdescription)); for ($i = 0; $i < count($srows); $i++) { $row = $srows[$i]; $negrowid = -$row->id; $database->setQuery("SELECT COUNT(*) FROM #__vemod_news_mailer_subs WHERE catid={$negrowid}"); $subcount = $database->loadResult(); ?> <tr class="<?php echo "row{$k}"; ?> "> <td align="center"><?php echo $i + 1; ?> </td> <td><?php echo $row->id; ?> </td> <td> <?php if (count($schecked)) { echo in_array($row->id, $schecked, TRUE) ? '<img src="images/publish_g.png" />' : '<img src="images/publish_x.png" />'; } ?> </td> <td><?php echo $row->title; ?> </td> <td align="left"><?php echo $sfdescription[-$row->id]; ?> </td> <td align"center"><?php echo $subcount; ?> </td> <td align="left"><input name="editcategory[]" type="button" onClick="this.form.editcatid.value='<?php echo -$row->id; ?> ';submitbutton('editsubscribers')" value="Subscribers"></td> </tr> <?php $k = 1 - $k; } ?> </table> <table cellpadding="4" cellspacing="0" border="0" width="100%" class="adminlist"> <tr> <th width="150" align="left">Add users</th> <th align="left">Please backup config first.</th> </tr> <tr class="row0"> <td>Bulk add users as subscribers</td> <td><input name="submitbulkadd" type="button" onClick="if (confirm('Add all users to all categories?')){submitbutton('bulkadd');}else{return;};" value="Bulk add"> Bulk add all users as subscribers to all selected categories. Users with invalid e-mail addresses will not be added.</td> </tr> </table> <table cellpadding="4" cellspacing="0" border="0" width="100%" class="adminlist"> <tr> <th align="left" width="150">Mail format</th><th align="left">Edit subscribers text or HTML settings</th> </tr> <tr class="row0"> <td>Edit subscribers mail format</td><td><input name="editmailformat" type="button" onClick="submitbutton('editmailformat')" value="Subscribers" <?php if ($mailformat != 2) { echo 'disabled="disabled"'; } ?> > (Enabled when Mail Format is "User decides")</td> </tr> </table> <table cellpadding="4" cellspacing="0" border="0" width="100%" class="adminlist"> <tr> <th align="left" width="150">SMS details</th> <th align="left">Edit subscribers SMS settings</th> </tr> <tr class="row0"> <td>Edit subscribers SMS details</td><td><input name="editsmsdetails" type="button" onClick="submitbutton('editsmsdetails')" value="Subscribers" <?php if (@$smsoperator == '') { echo 'disabled="disabled"'; } ?> > (Enabled when SMS provider is set)</td> </tr> </table> <input type="hidden" name="option" value="<?php echo $option; ?> " /> <input type="hidden" name="task" value="" /> <input type="hidden" name="boxchecked" value="0" /> <input type="hidden" name="editcatid" value=""/> </form> <?php }
</title> <script> $(document).ready(function() { // This command is used to initialize some elements and make them work properly $.material.init(); }); </script> </head> <body> <div class="container"> <!-- section title --> <?php echo sectionTitle($section_a_title); ?> <!-- section question --> <div class="row"> <div class="col-lg-12"> <div class="panel panel-material-grey"> <div class="panel-heading"> <h3><?php echo $q_a4; ?> </h3> </div> <div class="panel-body"> <form class="form-horizontal" id="mainForm" method="post" action="">
</title> <script> $(document).ready(function() { // This command is used to initialize some elements and make them work properly $.material.init(); }); </script> </head> <body> <div class="container"> <!-- section title --> <?php echo sectionTitle($section_c_title); ?> <!-- section question --> <div class="row"> <div class="col-lg-12"> <div class="panel panel-material-grey"> <div class="panel-heading"> <h3><?php echo $q_c1; ?> </h3> </div> <div class="panel-body"> <form class="form-horizontal" id="mainForm" method="post" action="">
</title> <script> $(document).ready(function() { // This command is used to initialize some elements and make them work properly $.material.init(); }); </script> </head> <body> <div class="container"> <!-- section title --> <?php echo sectionTitle($section_b_title); ?> <!-- section question --> <div class="row"> <div class="col-lg-12"> <div class="panel panel-material-grey"> <div class="panel-heading"> <h3><?php echo $q_b2e; ?> </h3> </div> <div class="panel-body"> <form class="form-horizontal" id="mainForm" method="post" action="">