<?php include "inc/adodb/adodb.inc.php"; include "inc/functions.inc.php"; include "inc/config.inc.php"; include "inc/smarty/Smarty.class.php"; // Get a list of content. if ($_GET["list"] == "all") { $narrative = get_all_content($connection[0]); } else { $narrative = get_non_ai_content($connection[0]); } // Get the affiliates list. $affiliate = get_affiliates($connection[0]); // Call Smarty $smarty = new Smarty(); // Assign variables foreach ($narrative as $key => $value) { $smarty->assign($key, $value); } // Affiliates foreach ($affiliate as $key => $value) { $smarty->assign($key, $value); } // Display $smarty->display("chapters.tpl"); $title = "Index"; //include("hitbox.php"); // Close DB connections foreach ($connection as $index => $handle) { $handle->close();
// number of joined listings (pending) $joined_pending = count(get_joined('pending')); // number of joined listings (approved) $joined_approved = count(get_joined('approved')); // number of joined listings (pending+approved) $joined = $joined_pending + $joined_approved; // number of owned listings (pending) $owned_pending = count(get_owned('pending')); // number of owned listings (upcoming) $owned_upcoming = count(get_owned('upcoming')); // number of owned listings (current) $owned_current = count(get_owned('current')); // number of owned listings (pending+upcoming+current) $owned = $owned_pending + $owned_upcoming + $owned_current; // number of collective affiliates $affiliates_collective = count(get_affiliates()); // newest owned fanlisting (current) if (count($all_owned) > 0) { $owned_newest = get_listing_info($all_owned[0]); } else { $owned_newest = array(); } // random owned fanlisting (current) $index = rand(0, count($all_owned) - 1); if (count($all_owned) > 0) { $owned_random = get_listing_info($all_owned[$index]); } else { $owned_random = array(); } // newest joined fanlisting (current) if (count($all_joined) > 0) {
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. For more information please view the readme.txt file. ******************************************************************************/ require 'config.php'; require_once 'mod_errorlogs.php'; require_once 'mod_affiliates.php'; require_once 'mod_owned.php'; require_once 'mod_settings.php'; // make sure fanlisting is set to have affiliates $info = get_listing_info($listing); if ($info['affiliates'] == 0) { echo '<p>The fanlisting has not been set up to have affiliates.</p>'; return; } // get affiliates and listing info $affiliates = get_affiliates($listing); foreach ($affiliates as $aff) { echo parse_affiliates_template($aff['affiliateid'], $listing); }
$info = null; $id = 'collective'; if ($_REQUEST['id'] == 'collective') { $info['title'] = get_setting('collective_name'); $from = '"' . html_entity_decode($info['title'], ENT_QUOTES) . '" <' . get_setting('owner_email') . '>'; } else { $info = get_listing_info($_REQUEST['id']); $id = $_REQUEST['id']; $from = '"' . html_entity_decode($info['title'], ENT_QUOTES) . '" <' . $info['email'] . '>'; } if (isset($_POST['send']) && $_POST['send'] == 'yes') { $headers = ''; $subject = ''; $body = ''; // get all affiliates $aff = get_affiliates($_POST['id']); foreach ($aff as $a) { if ($_POST['emailtemplate'] == 'no') { $parsed = parse_email_text($_POST['emailsubject'], $_POST['emailbody'], $a['affiliateid'], $_POST['id']); $subject = $parsed['subject']; $body = $parsed['body']; } else { // use predefined template $sendthis = parse_template($_POST['emailtemplate'], $a['affiliateid'], $_POST['id']); $subject = $sendthis['subject']; $body = $sendthis['body']; } // use send_email function $success = send_email($a['email'], $from, stripslashes($subject), stripslashes($body)); if ($success !== true) { echo '<p class="error">Email sending to <i>' . $a['email'] . '</i> failed. Please try sending to that address again.</p>';
http://scripts.indisguise.org/ Enthusiast is a tool for (fan)listing collective owners to easily maintain their listing collectives and listings under that collective. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. For more information please view the readme.txt file. ******************************************************************************/ require 'config.php'; require_once 'mod_errorlogs.php'; require_once 'mod_affiliates.php'; require_once 'mod_settings.php'; // get all affiliates $affiliates = get_affiliates(); echo get_setting('affiliates_template_header'); foreach ($affiliates as $aff) { echo parse_affiliates_template($aff['affiliateid']); } echo get_setting('affiliates_template_footer');
collective, select the site from the dropdown above. Note that only listings where you have defined the affiliates feature to be enabled are shown above.</p> <table> <tr><th> Site name </th><th> Image </th><th> Action </th></tr> <?php $start = isset($_REQUEST['start']) ? $_REQUEST['start'] : '0'; $affiliates = get_affiliates($listing, $start); $total = count(get_affiliates($listing)); if (count($affiliates) == 0) { echo '<tr><td colspan="3">No affiliates yet.</td></tr>'; } $shade = false; foreach ($affiliates as $aff) { $class = $shade ? ' class="rowshade"' : ''; $shade = !$shade; echo "<tr{$class}><td>"; echo '<a href="' . $aff['url'] . '">' . $aff['title'] . '</a>'; echo '</td><td>'; if ($aff['imagefile'] == '') { echo 'x</td><td>'; } else { $dir = get_setting('affiliates_dir'); if ($listing != '' && ctype_digit($listing)) {