function myErrorHandler($errno, $errstr, $errfile, $errline) { echo "{$errno}: {$errstr} in " . short($errfile) . " at line {$errline}<br />\n"; echo "Backtrace<br />\n"; $trace = debug_backtrace(); foreach ($trace as $ent) { if (isset($ent['file'])) { $ent['file'] . ':'; } if (isset($ent['function'])) { echo $ent['function'] . '('; if (isset($ent['args'])) { $args = ''; foreach ($ent['args'] as $arg) { $args .= $arg . ','; } echo rtrim(short($args), ','); } echo ') '; } if (isset($ent['line'])) { echo 'at line ' . $ent['line'] . ' '; } if (isset($ent['file'])) { echo 'in ' . short($ent['file']); } echo "<br />\n"; } }
//if custom field is of 'Date' type, format the date if ($cf_array[1] == 'Date') { $link = str_replace($tag, strftime("%a, %b %d, %Y", $custom_values_array[$j]), $link); } else { $link = str_replace($tag, $custom_values_array[$j], $link); } } } else { $k++; } } if ($k == $cf_count) { $link = str_replace($tag, $fallback, $link); } } } } } //Email tag $link = str_replace('[Email]', $email, $link); //webversion and unsubscribe tags if ($ares_emails_id == '') { $link = str_replace('[webversion]', APP_PATH . '/w/' . short($userID) . '/' . short($list_id) . '/' . short($campaign_id), $link); $link = str_replace('[unsubscribe]', APP_PATH . '/unsubscribe/' . short($email) . '/' . short($list_id) . '/' . short($campaign_id), $link); } else { $link = str_replace('[webversion]', APP_PATH . '/w/' . short($userID) . '/' . short($list_id) . '/' . short($campaign_id) . '/a', $link); $link = str_replace('[unsubscribe]', APP_PATH . '/unsubscribe/' . short($email) . '/' . short($list_id) . '/' . short($campaign_id) . '/a', $link); } //redirect to link $link = substr($link, 0, 4) != 'http' ? 'http://' . $link : $link; header("Location: {$link}");
/** * @param $source * @param $branch * @param $revision * @return bool */ function branch($source, $branch, $revision) { $short = short($branch); $file = escapeshellarg("{$branch}/tiki-index.php"); $source = escapeshellarg($source); $branch = escapeshellarg($branch); $message = escapeshellarg("[BRANCH] Creation, {$short} 0 to {$revision}"); `svn copy {$source} {$branch} -m {$message}`; $f = @simplexml_load_string(`svn info --xml {$file}`); return isset($f->entry); }
$ic .= '<th class="' . $vartype[$i] . '"><p>' . $field[$i]['comment'] . '</p></th>'; } $ic .= '<th></th></tr>'; $ask = mysql_query("SELECT * FROM {$table} {$sq} ORDER BY `{$i}` DESC LIMIT" . $pag->sqlcode()); while ($b = mysql_fetch_assoc($ask)) { $ic .= "<tr>"; $ic .= "<td><input type='checkbox' name='" . $b[$ai] . "'></td>"; for ($i = 0; $i < $column; $i++) { if ($vartype[$i] == 'date') { $ic .= "<td class='date'>" . htmlentities($b[$field[$i]['name']], ENT_QUOTES, "UTF-8") . '</td>'; } elseif ($vartype[$i] == 'image') { $ic .= "<td class='image'> <a href='" . $b[$field[$i]['name']] . "' id='effect' alt='das'><img src='" . $b[$field[$i]['name']] . "' class='thumb' onerror='this.src=\"images/picture_error.png\"'></a></td>"; } elseif ($vartype[$i] == 'text') { $ic .= "<td>" . short(100, strip_tags($b[$field[$i]['name']])) . '</td>'; } elseif ($vartype[$i] == 'textarea') { $ic .= "<td>" . short(100, strip_tags($b[$field[$i]['name']])) . '</td>'; } else { $ic .= "<td>" . htmlentities($b[$field[$i]], ENT_QUOTES, "UTF-8") . '</td>'; } } $ic .= "<td>\n<a href='?c=" . $cid . "&edit=" . $b[$ai] . "'><img src='images/plugin_edit.png'></a>\n<a href='?c=" . $cid . "&delete=" . $b[$ai] . "' onclick=\"return confirm('Bu girdi geri dönüşümsüz biçimde silinecek, emin misiniz?');\"><img src='images/plugin_delete.png'></a></td></tr>"; } $ic .= '</table>'; $ic .= $pag->write(); } // Start New Entry if (isset($_GET["new"])) { if (isset($_POST["var0"])) { $dbcolumn = NULL; $var = NULL; for ($i = 0; $i < $column; $i++) {
if ($r && mysqli_num_rows($r) > 0) { while ($row = mysqli_fetch_array($r)) { $id = $row['id']; $name = stripslashes($row['name']); $subscribers_count = get_subscribers_count($id); $unsubscribers_count = get_unsubscribers_count($id); $bounces_count = get_bounced_count($id); if (strlen(short($id)) > 5) { $listid = substr(short($id), 0, 5) . '..'; } else { $listid = short($id); } echo ' <tr id="' . $id . '"> <td><span class="label" id="list' . $id . '">' . $listid . '</span><span class="label encrypted-list-id" id="list' . $id . '-encrypted" style="display:none;">' . short($id) . '</span></td> <td><a href="' . get_app_info('path') . '/subscribers?i=' . get_app_info('app') . '&l=' . $id . '" title="">' . $name . '</a></td> <td id="progress' . $id . '">' . $subscribers_count . '</td> <td><span class="label">' . get_unsubscribers_percentage($subscribers_count, $unsubscribers_count) . '%</span> ' . $unsubscribers_count . ' ' . _('users') . '</td> <td><span class="label">' . get_bounced_percentage($bounces_count, $subscribers_count) . '%</span> ' . $bounces_count . ' ' . _('users') . '</td> <td><a href="edit-list?i=' . get_app_info('app') . '&l=' . $id . '" title=""><i class="icon icon-pencil"></i></a></td> <td><a href="javascript:void(0)" title="' . _('Delete') . ' ' . $name . '?" id="delete-btn-' . $id . '" class="delete-list"><i class="icon icon-trash"></i></a></td> <script type="text/javascript"> $("#delete-btn-' . $id . '").click(function(e){ e.preventDefault(); c = confirm("' . _('All subscribers, custom fields and autoresponders in this list will also be permanently deleted. Confirm delete') . ' ' . $name . '?"); if(c) { $.post("includes/list/delete.php", { list_id: ' . $id . ' }, function(data) { if(data)
/** * The class name of an object, without the namespace * @param object|string $object * @return string */ public static function short($object) { return short($object); }
} $destination = $local->entry->url; if (!is_trunk($destination)) { error("This script is likely not to be appropriate for this working copy. This script can be used in:\n\ttrunk"); } $source = full($_SERVER['argv'][1]); if (!is_experimental($source)) { error("The provided source cannot be used to update this working copy. Only experimental branches can be used."); } if (has_uncommited_changes('.')) { error("Working copy has uncommited changes. Revert or commit them before merging a branch."); } $revision = (int) get_info($destination)->entry->commit['revision']; $last = find_last_merge($source, $destination); $sDest = short($destination); $sSource = short($source); if ($last !== $revision) { error("You must branchupdate {$sSource} from {$sDest} before merging."); } // Proceed to update info("Updating..."); update_working_copy('.'); // Do merge info("Merging..."); incorporate($destination, $source); important("After verifications, commit using a meaningful message for this feature."); $conflicts = get_conflicts('.'); if ($conflicts->length > 0) { $message = "Conflicts occurred during the merge. Fix the conflicts and start again."; foreach ($conflicts as $path) { $path = $path->parentNode->getAttribute('path');
if ($custom_fields != '') { $custom_fields_array = explode('%s%', $custom_fields); foreach ($custom_fields_array as $cf) { $cf_array = explode(':', $cf); echo ' <br/> <label for="' . str_replace(' ', '', $cf_array[0]) . '">' . $cf_array[0] . '</label><br/> <input type="text" name="' . str_replace(' ', '', $cf_array[0]) . '" id="' . str_replace(' ', '', $cf_array[0]) . '"/>'; } } } ?> <br/> <input type="hidden" name="list" value="<?php echo short($lid); ?> "/> <input type="submit" name="submit" id="submit"/> </form></pre> <script type="text/javascript"> $(document).ready(function() { $("#form-code").click(function(){ $(this).selectText(); }); }); </script> </div> <div class="modal-footer">
if ($custom_fields != '') { $custom_fields_array = explode('%s%', $custom_fields); foreach ($custom_fields_array as $cf) { $cf_array = explode(':', $cf); echo ' <br/> <label for="' . str_replace(' ', '', $cf_array[0]) . '">' . $cf_array[0] . '</label><br/> <input type="text" name="' . str_replace(' ', '', $cf_array[0]) . '" id="' . str_replace(' ', '', $cf_array[0]) . '"/>'; } } } ?> <br/> <input type="hidden" name="list" value="<?php echo short($_GET['l']); ?> "/> <input type="submit" name="submit" id="submit"/> </form></pre> </div> <div class="modal-footer"> <a href="#" class="btn btn-inverse" data-dismiss="modal"><i class="icon icon-ok-sign"></i> <?php echo _('Okay'); ?> </a> </div> </div> <?php
?> &a=<?php echo $_GET['a']; ?> &ae=<?php echo $ares_email_id; ?> " title=""><?php echo _('Edit'); ?> </a></li> <li><a href="<?php echo get_app_info('path'); ?> /w/<?php echo short($ares_email_id); ?> /a?<?php echo time(); ?> " title="" class="iframe-preview"><?php echo _('Preview'); ?> </a></li> <li><a href="javascript:void(0)" title="" id="delete-<?php echo $ares_email_id; ?> " data-id="<?php echo $ares_email_id; ?> "><?php
$k++; } } if ($k == $cf_count) { $html = str_replace($tag, $fallback, $html); } } } } //Email tag $html = str_replace('[Email]', $email, $html); //set web version links $html = str_replace('<webversion', '<a href="' . APP_PATH . '/w/' . short($subscriber_id) . '/' . short($subscriber_list) . '/' . short($campaign_id) . '" ', $html); $html = str_replace('</webversion>', '</a>', $html); //set unsubscribe links $html = str_replace('<unsubscribe', '<a href="' . APP_PATH . '/unsubscribe/' . short($email) . '/' . short($subscriber_list) . '/' . short($campaign_id) . '" ', $html); $html = str_replace('</unsubscribe>', '</a>', $html); //Update click count //if this is an autoresponder web version, if (count($i_array) == 4 && $i_array[3] == 'a') { $q = 'SELECT clicks, link FROM links WHERE link = "' . APP_PATH . '/w/' . $i_array[2] . '/a"'; } else { $q = 'SELECT clicks, link FROM links WHERE link = "' . APP_PATH . '/w/' . $i_array[2] . '"'; } $r = mysqli_query($mysqli, $q); if ($r && mysqli_num_rows($r) > 0) { while ($row = mysqli_fetch_array($r)) { $clicks = $row['clicks']; $link = $row['link']; if ($clicks == '') { $val = $subscriber_id;
$mail->Host = $smtp_host; $mail->Port = $smtp_port; $mail->Username = $smtp_username; $mail->Password = $smtp_password; } } $mail->Timezone = $user_timezone; $mail->CharSet = "UTF-8"; $mail->From = $from_email; $mail->FromName = $from_name; $mail->Subject = $title_treated; $mail->AltBody = $plain_treated; $mail->MsgHTML($html_treated); $mail->AddAddress($email, $name); $mail->AddReplyTo($reply_to, $from_name); $mail->AddCustomHeader('List-Unsubscribe: <' . APP_PATH . '/unsubscribe/' . short($email) . '/' . short($subscriber_list) . '/' . short($campaign_id) . '>'); //check if attachments are available for this campaign to attach if (file_exists($server_path . 'uploads/attachments/' . $campaign_id)) { foreach (glob($server_path . 'uploads/attachments/' . $campaign_id . '/*') as $attachment) { if (file_exists($attachment)) { $mail->AddAttachment($attachment); } } } $mail->Send(); //increment recipient count if not using AWS or SMTP if ($s3_key == '' && $s3_secret == '') { //increment recipients number in campaigns table $q5 = 'UPDATE campaigns SET recipients = recipients+1 WHERE id = ' . $campaign_id; mysqli_query($mysqli, $q5); //update last_campaign
include '../_connect.php'; include '../../includes/helpers/short.php'; //-------------------------- ERRORS -------------------------// $error_core = array('No data passed', 'API key not passed', 'Invalid API key'); $error_passed = array('List ID not passed', 'List does not exist'); //-----------------------------------------------------------// //--------------------------- POST --------------------------// //api_key if (isset($_POST['api_key'])) { $api_key = mysqli_real_escape_string($mysqli, $_POST['api_key']); } else { $api_key = null; } //list_id if (isset($_POST['list_id'])) { $list_id = short(mysqli_real_escape_string($mysqli, $_POST['list_id']), true); } else { $list_id = null; } //-----------------------------------------------------------// //----------------------- VERIFICATION ----------------------// //Core data if ($api_key == null && $list_id == null) { echo $error_core[0]; exit; } if ($api_key == null) { echo $error_core[1]; exit; } else { if (!verify_api_key($api_key)) {
if ($k == $cf_count) { $html = str_replace($tag, $fallback, $html); } } } } //Email tag $html = str_replace('[Email]', $email, $html); //set web version links $html = str_replace('<webversion', '<a href="' . APP_PATH . '/w/' . short($subscriber_id) . '/' . short($subscriber_list) . '/' . short($campaign_id) . '" ', $html); $html = str_replace('</webversion>', '</a>', $html); $html = str_replace('[webversion]', APP_PATH . '/w/' . short($subscriber_id) . '/' . short($subscriber_list) . '/' . short($campaign_id), $html); //set unsubscribe links $html = str_replace('<unsubscribe', '<a href="' . APP_PATH . '/unsubscribe/' . short($email) . '/' . short($subscriber_list) . '/' . short($campaign_id) . '" ', $html); $html = str_replace('</unsubscribe>', '</a>', $html); $html = str_replace('[unsubscribe]', APP_PATH . '/unsubscribe/' . short($email) . '/' . short($subscriber_list) . '/' . short($campaign_id), $html); //convert date tags convert_date_tags(); //convert date tags function convert_date_tags() { global $timezone; global $html; global $sent; global $send_date; if ($timezone != '') { date_default_timezone_set($timezone); } $today = $sent == '' ? time() : $sent; $today = $send_date != '' && $send_date != 0 ? $send_date : $today; $currentdaynumber = strftime('%d', $today);
$mail->AltBody = ''; $mail->MsgHTML($thankyou_message); $mail->AddAddress($email, ''); $mail->AddReplyTo($reply_to, $from_name); $mail->Send(); //Update quota if a monthly limit was set if ($allocated_quota != -1) { //if so, update quota $q4 = 'UPDATE apps SET current_quota = current_quota+1 WHERE id = ' . $app; mysqli_query($mysqli, $q4); } } //if user sets a redirection URL if ($confirm_url != '') { $confirm_url = str_replace('%e', $email, $confirm_url); $confirm_url = str_replace('%l', short($list_id), $confirm_url); header("Location: " . $subscribed_url); header("Location: " . $confirm_url); } else { ?> <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="Shortcut Icon" type="image/ico" href="<?php echo APP_PATH; ?> /img/favicon.png"> <title><?php echo _('You\'re subscribed!');
} } //set web version links $html_treated = str_replace('<webversion', '<a href="' . APP_PATH . '/w/' . short($subscriber_id) . '/' . short($list) . '/' . short($ares_id) . '/a" ', $html_treated); $html_treated = str_replace('</webversion>', '</a>', $html_treated); $plain_treated = str_replace('[webversion]', APP_PATH . '/w/' . short($subscriber_id) . '/' . short($list) . '/' . short($ares_id) . '/a', $plain_treated); //set unsubscribe links $html_treated = str_replace('<unsubscribe', '<a href="' . APP_PATH . '/unsubscribe/' . short($email) . '/' . short($list) . '/' . short($ares_id) . '/a" ', $html_treated); $html_treated = str_replace('</unsubscribe>', '</a>', $html_treated); $plain_treated = str_replace('[unsubscribe]', APP_PATH . '/unsubscribe/' . short($email) . '/' . short($list) . '/' . short($ares_id) . '/a', $plain_treated); //Email tag $html_treated = str_replace('[Email]', $email, $html_treated); $plain_treated = str_replace('[Email]', $email, $plain_treated); $title_treated = str_replace('[Email]', $email, $title_treated); //add tracking 1 by 1px image $html_treated .= '<img src="' . APP_PATH . '/t/' . short($ares_id) . '/' . short($subscriber_id) . '/a" />'; //send email $mail = new PHPMailer(); if ($s3_key != '' && $s3_secret != '') { $mail->IsAmazonSES(); $mail->AddAmazonSESKey($s3_key, $s3_secret); } else { if ($smtp_host != '' && $smtp_port != '' && $smtp_ssl != '' && $smtp_username != '' && $smtp_password != '') { $mail->IsSMTP(); $mail->SMTPDebug = 0; $mail->SMTPAuth = true; $mail->SMTPSecure = $smtp_ssl; $mail->Host = $smtp_host; $mail->Port = $smtp_port; $mail->Username = $smtp_username; $mail->Password = $smtp_password;
function make_link($atts) { extract(shortcode_atts(array('link' => '/', 'type' => 'full', 'tw' => 'tw', 'fb' => 'fb', 'pt' => 'pt', 'ig' => 'ig'), $atts)); switch ($type) { case 'full': return full($link); case 'short': return short($link); case 'wide': return wide($link); case 'socials': return socials(array('main' => $link, 'tw' => $tw, 'fb' => $fb, 'pt' => $pt, 'ig' => $ig)); } }
$mail->Host = $smtp_host; $mail->Port = $smtp_port; $mail->Username = $smtp_username; $mail->Password = $smtp_password; } } $mail->Timezone = $user_timezone; $mail->CharSet = "UTF-8"; $mail->From = $from_email; $mail->FromName = $from_name; $mail->Subject = $title_treated; $mail->AltBody = $plain_treated; $mail->MsgHTML($html_treated); $mail->AddAddress($email, $name); $mail->AddReplyTo($reply_to, $from_name); $mail->AddCustomHeader('List-Unsubscribe: <' . APP_PATH . '/unsubscribe/' . short($email) . '/' . short($list) . '/' . short($ares_id) . '/a>'); $server_path_array = explode('autoresponders.php', $_SERVER['SCRIPT_FILENAME']); $server_path = $server_path_array[0]; if (file_exists($server_path . 'uploads/attachments/a' . $ares_id)) { foreach (glob($server_path . 'uploads/attachments/a' . $ares_id . '/*') as $attachment) { if (file_exists($attachment)) { $mail->AddAttachment($attachment); } } } $mail->Send(); $q3 = 'UPDATE ares_emails, subscribers SET ares_emails.recipients = ares_emails.recipients+1, subscribers.last_ares = ' . $ares_id . ' WHERE ares_emails.id = ' . $ares_id . ' AND subscribers.id = ' . $subscriber_id; mysqli_query($mysqli, $q3); //Update quota if a monthly limit was set if ($allocated_quota != -1) { //if so, update quota
<body> <div id="wrapper"> <h2><?php echo $feedback; ?> </h2> <?php if ($feedback != _('Email address is invalid.')) { ?> <p><a href="<?php echo APP_PATH; ?> /subscribe/<?php echo short($email); ?> /<?php echo short($list_id); ?> " title=""><?php echo _('Re-subscribe?'); ?> </a></p> <?php } ?> </div> </body> </html> <?php } }
while ($row = mysqli_fetch_array($r2)) { $app = $row['app']; } $q3 = 'SELECT from_name, from_email, reply_to FROM apps WHERE id = ' . $app; $r3 = mysqli_query($mysqli, $q3); if ($r3) { while ($row = mysqli_fetch_array($r3)) { $from_name = $row['from_name']; $from_email = $row['from_email']; $reply_to = $row['reply_to']; } } } //send confirmation email if list is double opt in if ($opt_in && $confirmed != 1) { $confirmation_link = APP_PATH . '/confirm?e=' . short($subscriber_id) . '&l=' . short($list_id); $q = 'SELECT confirmation_subject, confirmation_email FROM lists WHERE id = ' . $list_id; $r = mysqli_query($mysqli, $q); if ($r && mysqli_num_rows($r) > 0) { while ($row = mysqli_fetch_array($r)) { $confirmation_subject = stripslashes($row['confirmation_subject']); $confirmation_email = stripslashes($row['confirmation_email']); } } if ($confirmation_subject == '') { $confirmation_subject = _('Confirm your subscription to') . ' ' . $from_name; } if (strlen(trim(preg_replace('/\\xc2\\xa0/', ' ', $confirmation_email))) == 0 || trim($confirmation_email) == '<p><br></p>') { $confirmation_email = '<p>' . _('Hi!') . '</p> <p>' . _('Thanks for subscribing to our email list.') . '</p>
function parse_args(array $args) { $str = '('; $i = 0; foreach ($args as $arg) { if ($i > 0) { $str .= ', '; } switch (gettype($arg)) { case 'object': $str .= '<em>object</em>(' . short(get_class($arg)) . ')'; break; case 'array': $str .= '<em>array</em>(' . parse_args($arg) . ')'; break; case 'string': $str .= "'" . $arg . "'"; break; case 'NULL': $str .= 'null'; break; default: $str .= $arg; } $i++; } $str .= ')'; return $str; }
<?php include "../config.php"; include "../function.php"; // GET ile veri gelmemişse burayı işle if (!$_GET) { // BLog ile ilgili genel ayarları al $sor = mysql_query("SELECT blog.post_id, blog.post_title, blog.post_date, blog.post_content, COUNT(comments.comment_id) FROM blog LEFT JOIN comments ON blog.post_id=owner_id GROUP BY blog.post_id"); while ($veri = mysql_fetch_assoc($sor)) { $ic .= $veri["post_date"]; $ic .= '<a href="?sayfa=' . $veri["post_id"] . '">' . $veri["post_title"] . '</a>'; $ic .= $veri["COUNT(comments.comment_id)"] . ' yorum'; $ic .= short(100, $veri["post_content"]); } } // GET ile sayfa verisi gelmişse burayı işe if (isset($_GET["sayfa"])) { $id = $_GET["sayfa"]; if (isset($_POST["name"])) { ob_start(); $name = $_POST["name"]; $comment = $_POST["comment"]; $date = date("d.m.Y G:i"); mysql_query("INSERT INTO comments (owner_id, comment_name, comment_content, comment_date) VALUES ('{$id}','{$name}','{$comment}','{$date}')"); header("Location:" . $_SERVER['PHP_SELF'] . '?' . $_SERVER['QUERY_STRING'] . "&mesaj=1"); } else { // BLog içeriğiyle ile ilgili genel ayarları al $sor = mysql_query("SELECT * FROM blog WHERE post_id='{$id}'"); while ($veri = mysql_fetch_assoc($sor)) { $comm = mysql_query("SELECT * FROM comments WHERE owner_id='{$id}'"); $ic .= $veri["post_date"] . "\n";
} } //set web version links $html_treated = str_replace('<webversion', '<a href="' . APP_PATH . '/w/' . short($subscriber_id) . '/' . short($subscriber_list) . '/' . short($campaign_id) . '" ', $html_treated); $html_treated = str_replace('</webversion>', '</a>', $html_treated); $plain_treated = str_replace('[webversion]', APP_PATH . '/w/' . short($subscriber_id) . '/' . short($subscriber_list) . '/' . short($campaign_id), $plain_treated); //set unsubscribe links $html_treated = str_replace('<unsubscribe', '<a href="' . APP_PATH . '/unsubscribe/' . short($email) . '/' . short($subscriber_list) . '/' . short($campaign_id) . '" ', $html_treated); $html_treated = str_replace('</unsubscribe>', '</a>', $html_treated); $plain_treated = str_replace('[unsubscribe]', APP_PATH . '/unsubscribe/' . short($email) . '/' . short($subscriber_list) . '/' . short($campaign_id), $plain_treated); //Email tag $html_treated = str_replace('[Email]', $email, $html_treated); $plain_treated = str_replace('[Email]', $email, $plain_treated); $title_treated = str_replace('[Email]', $email, $title_treated); //add tracking 1 by 1px image $html_treated .= '<img src="' . APP_PATH . '/t/' . short($campaign_id) . '/' . short($subscriber_id) . '" />'; //Get server path $server_path_array = explode('scheduled.php', $_SERVER['SCRIPT_FILENAME']); $server_path = $server_path_array[0]; //send email $mail = new PHPMailer(); if ($s3_key != '' && $s3_secret != '') { //if there is an attachment, don't use curl_multi if (file_exists($server_path . 'uploads/attachments/' . $campaign_id)) { $mail->IsAmazonSES(false, $campaign_id, $subscriber_id, $user_timezone); } else { $mail->IsAmazonSES(true, $campaign_id, $subscriber_id, $user_timezone); } $mail->AddAmazonSESKey($s3_key, $s3_secret); } else { if ($smtp_host != '' && $smtp_port != '' && $smtp_username != '' && $smtp_password != '') {
<<?php echo get_saved_data('from_email'); ?> ></span></blockquote> <blockquote><strong><?php echo _('Subject'); ?> </strong> <span class="label"><?php echo get_saved_data('title'); ?> </span></blockquote> <iframe src="<?php echo get_app_info('path'); ?> /w/<?php echo short($_GET['c']); ?> ?<?php echo time(); ?> " id="preview-iframe"></iframe> </div> </div> </div> <script type="text/javascript"> $(document).ready(function() { var send_or_schedule = ''; //schedule btn $("#schedule-btn").click(function(e){
mysqli_set_charset($mysqli, isset($charset) ? $charset : "utf8"); return $mysqli; } //--------------------------------------------------------------// function fail($errorMsg) { //Database connection fails //--------------------------------------------------------------// echo $errorMsg; exit; } // connect to database dbConnect(); include 'includes/helpers/short.php'; $email_id = short(mysqli_real_escape_string($mysqli, $_GET['e']), true); $list_id = short(mysqli_real_escape_string($mysqli, $_GET['l']), true); $join_date = round(time() / 60) * 60; //Set language $q = 'SELECT login.language FROM lists, login WHERE lists.id = ' . $list_id . ' AND login.app = lists.app'; $r = mysqli_query($mysqli, $q); if ($r && mysqli_num_rows($r) > 0) { while ($row = mysqli_fetch_array($r)) { $language = $row['language']; } } set_locale($language); $q = 'UPDATE subscribers SET confirmed = 1, join_date = CASE WHEN join_date IS NULL THEN ' . $join_date . ' ELSE join_date END WHERE id = ' . $email_id . ' AND list = ' . $list_id; $r = mysqli_query($mysqli, $q); if ($r) { //get thank you message etc $q2 = 'SELECT app, userID, thankyou, thankyou_subject, thankyou_message, confirm_url FROM lists WHERE id = ' . $list_id;
//--------------------------------------------------------------// print 'Database error'; exit; } // connect to database dbConnect(); include 'includes/helpers/geo/geoip.inc'; include 'includes/helpers/short.php'; header("Cache-Control: no-cache, must-revalidate"); header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); //----------------------------------------------------------------// //get variable $i = mysqli_real_escape_string($mysqli, $_GET['i']); $i_array = explode('/', $i); $campaign_id = short($i_array[0], true); $userID = short($i_array[1], true); if (array_key_exists(2, $i_array)) { $ares = $i_array[2]; } else { $ares = ''; } //get user's client $useragent = $_SERVER['HTTP_USER_AGENT']; //get user's ip address & country code if (getenv("HTTP_CLIENT_IP")) { $ip = getenv("HTTP_CLIENT_IP"); } elseif (getenv("HTTP_X_FORWARDED_FOR")) { $ip = getenv("HTTP_X_FORWARDED_FOR"); } else { $ip = getenv("REMOTE_ADDR"); }
?> </p> </div> <h2><?php echo _('Campaign report'); ?> </h2><br/> <h3><?php echo get_saved_data('title'); ?> <a href="<?php echo get_app_info('path'); ?> /w/<?php echo short($id); ?> " title="<?php echo _('View the campaign'); ?> " class="iframe-preview"><span class="icon-eye-open"></span></a></h3><br/> <p><em><?php echo _('Sent on'); ?> <?php echo parse_date(get_saved_data('sent'), 'long', false); ?> <?php echo _('to'); ?> <span class="label"><?php
//if so, update quota $q4 = 'UPDATE apps SET current_quota = current_quota+1 WHERE id = ' . $app; mysqli_query($mysqli, $q4); } } } } } if ($return_boolean == 'true') { echo true; exit; } else { //if user sets a redirection URL if ($subscribed_url != '') { $subscribed_url = str_replace('%e', $email, $subscribed_url); $subscribed_url = str_replace('%l', short($list_id), $subscribed_url); header("Location: " . $subscribed_url); } else { ?> <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="Shortcut Icon" type="image/ico" href="<?php echo APP_PATH; ?> /img/favicon.png"> <title><?php echo _('Subscribed'); ?>
//-----------------------------------------------------------// //-------------------------- QUERY --------------------------// //Get userID $q = 'SELECT id FROM login ORDER BY id ASC LIMIT 1'; $r = mysqli_query($mysqli, $q); if ($r) { while ($row = mysqli_fetch_array($r)) { $userID = $row['id']; } } if ($send_campaign) { //Set send time $sent = time(); //Get list IDs foreach ($list_id as $listid) { $listids .= trim(short($listid, true)) . ','; } $listids = substr($listids, 0, -1); //Get number of recipients to send to $q = 'SELECT id as to_send FROM subscribers WHERE list IN (' . $listids . ') AND unsubscribed=0 AND bounced=0 AND complaint=0 AND confirmed=1 GROUP BY email'; $r = mysqli_query($mysqli, $q); $to_send = mysqli_num_rows(mysqli_query($mysqli, $q)); //Create and send campaign $q2 = 'INSERT INTO campaigns (userID, app, from_name, from_email, reply_to, title, plain_text, html_text, wysiwyg, sent, to_send, send_date, lists, timezone, query_string) VALUES (' . $userID . ', ' . $app . ', "' . $from_name . '", "' . $from_email . '", "' . $reply_to . '", "' . $subject . '", "' . $plain_text . '", "' . $html_text . '", 1, "' . $sent . '", ' . $to_send . ', 0, "' . $listids . '", 0, "' . $query_string . '")'; $r2 = mysqli_query($mysqli, $q2); if ($r2) { echo 'Campaign created and now sending'; //Check if monthly quota needs to be updated $q = 'SELECT allocated_quota, current_quota FROM apps WHERE id = ' . $app; $r = mysqli_query($mysqli, $q); if ($r) {
<div id="frame" class="frame"> <section class="content"> <div class="poster_image"> <img src="/imgs/movie_main_imgs/<?php echo $mov['url']; ?> .jpg"> </div> <article class="movie_info"> <h1><?php echo $mov['title']; ?> </h1> <div class="factframe"> <?php echo dates($mov['theater'], "Theatrical Release") . dates($mov['video'], "Home Video Release") . short($mov['short']) . boxoffice($mov['boxoffice']); ?> </div> <h2>Links</h2> <div class="factframe"> <div class="factbox"> <img src="/imgs/interface/amazon.png" alt="amazon logo" class="amazon_logo"> <?php echo amazon($mov['3d'], $mov['bluray'], $mov['dvd'], $mov['cd'], $mov['book'], $mov['title']); ?> </div> <div class="factbox"> <h3>Other Links</h3> <?php if (!empty($mov['trailer'])) {