<div property="mainContentOfPage"> <?php the_content(); ?> <?php ini_set('max_execution_time', 30000); $stylesheetPath = get_stylesheet_directory_uri(); //echo $stylesheetPath; require "{$stylesheetPath}/assets/php/config.php"; $unfollowerArray = find_unfollowers($connection, $myScreenName, $count, $sleep, $debug, $numberOfFollowers, $cursorTarget); if ($debug) { echo 'Unfollower Array Finished: '; print_r($unfollowerArray); } $unfollowerNumber = count($unfollowerArray); if ($unfollowerNumber != 0) { ?> <h2>You have <?php echo $unfollowerNumber; ?> people not following you back.</h2> <form method="POST" action="<?php echo $stylesheetPath; ?> /templates/content-unfollow.php"> <button type="submit" name="unfollow">Unfollow</button> </form> <?php if (isset($_REQUEST['unfollow'])) {
require 'functions.php'; echo "<h4 class='help'>This is where you can unfollow people who you are following, but they never returned the favor.</h4>"; if (isset($_POST['unfollow']) && isset($_POST['unfollowerArray'])) { $unfollowerArray = unserialize($_POST['unfollowerArray']); if ($debug) { print_r($unfollowerArray); } unfollow_by_id($connection, $unfollowerArray, $dataFileDirectory); } else { $canUnfollow = follow_check($connection, $debug, $myScreenName, $cursorTarget); if ($debug) { echo "canFollow: {$canFollow}<br>"; } if ($canUnfollow) { loading_gif(); $unfollowerArray = find_unfollowers($connection, $myScreenName, $count, $debug); if ($debug) { echo 'Unfollower Array Finished: '; print_r($unfollowerArray); } $unfollowerNumber = count($unfollowerArray); $unfollowerArray = serialize($unfollowerArray); if ($unfollowerNumber > 0) { ?> <script src="../../assets/js/functions.js" type="text/javascript"></script><?php echo "<h2 class='unfollower_amount'>You have {$unfollowerNumber} people not following you back.</h2>"; echo '<form method="POST" class="copy_form" id="unfollow_form">'; // echo '<button type="submit" onClick="'; echo "false updateNumbers($unfollowerArray);"; echo '" name="unfollow">Unfollow</button>'; echo '<button type="submit" name="unfollow">Unfollow</button>'; echo '<input type="hidden" name="unfollowerArray" value="' . $unfollowerArray . '">'; echo '</form>';