コード例 #1
0
ファイル: action.php プロジェクト: radicaldesigns/jaguar
	</div><!--row-->
	
	<?php 
}
?>
			<div class="row span6  alert-success alert">
			<p>To add or remove triggers <a href="https://hq-salsa.wiredforchange.com/dia/hq/p/dia/action/hq/edit?object=action&key=<?php 
echo $a['action_KEY'];
?>
&tab=5" target="_blank">go here</a></p>
		</div>
		<div id="trigger-guide" class="row span9 well">
		<h3>Trigger Guides</h3>
			<?php 
echo action_links($a['campaign_slug']);
?>
		</div>
</section>


<section id='action-share'>
	<div class="page-header"><h2>Share Page<i class="icon-gift offset9" id="populate-share"></h2></i></div>
	<div class="row">

		<div class="span7 column">
			<input name="tell_a_friend[key]" value="<?php 
echo $a['tell_a_friend']['tell_a_friend_KEY'];
?>
" type="hidden">
			<label>Share Page Title</label>
コード例 #2
0
function action_detail($key)
{
    global $db;
    $sql = 'select * from action where action_KEY =' . $key;
    $A = $db->CacheExecute($sql) or die($db->errorMsg());
    $a = $A->FetchRow();
    echo '<h2>' . $a['Reference_Name'] . '</h2>';
    echo '<div class="row">';
    echo '<div class="span3">';
    echo 'Unique Actions Taken: ' . action_count_distinct($key) . '<br>';
    echo 'Actions Taken: ' . action_count($key) . '<br>';
    echo '</div>';
    echo '<div class="span3">';
    $options['slug'] = $a['campaign_slug'];
    echo 'New Supporters: ' . action_new_supporters($key) . '<br>';
    echo 'New Supporters Deliverable: ' . action_new_supporters_deliverable($key) . '<br>';
    echo 'Supporter Referrals: ' . action_referrer_supporter($key, $options) . '<br>';
    echo '</div>';
    echo '<div class="span3">';
    echo 'Actions This Week: ' . action_count($key) . '<br>';
    echo 'New This Week: ' . action_new_supporters_date($key, LAST_WEEK) . '<br>';
    echo 'New Deliverable This Week: ' . action_new_supporters_deliverable_date($key, LAST_WEEK) . '<br>';
    echo '</div>';
    echo '</div>';
    $emails = action_emails($key);
    $emails_count = action_emails_count($key);
    $ref = action_referrer($key);
    $partners = action_partners($key);
    if ($emails) {
        $email_blast_options = array('where' => ' and e.email_blast_KEY in (' . $emails . ') ');
        include '../partials/_email_blast_list.php';
    }
    echo '<h3>Action Sources</h3><div class="row">';
    echo '<div class="span4">';
    echo '<h4>Codes</h4>';
    echo '<table class="table">';
    if ($ref) {
        foreach ($ref as $i) {
            echo '<tr>';
            echo '<td>' . $i['referrer'] . '</td>';
            echo '<td>' . $i['count'] . '</td>';
            echo '</tr>';
        }
    }
    echo '</table>';
    echo '</div>';
    echo '<div class="span4">';
    echo '<h4>Emails</h4>';
    echo '<table class="table">';
    if ($emails_count) {
        foreach ($emails_count as $i) {
            echo '<tr>';
            echo '<td><a href="../object.php?object=email_blast&key=' . $i['email_blast_KEY'] . '">' . get_email_blasts_name($i['email_blast_KEY']) . '</a></td>';
            echo '<td>' . $i['count'] . '</td>';
            echo '</tr>';
        }
    }
    echo '</table>';
    echo '</div>';
    if ($partners) {
        echo '<div class="span4">';
        echo '<h4>Partners</h4><br>';
        echo '<table class="table">';
        foreach ($partners as $i) {
            if ($i['partner_code']) {
                echo '<tr>';
                echo '<td>' . $i['partner_code'] . '</td>';
                echo '<td>' . $i['count'] . '</td>';
                echo '</tr>';
            }
        }
        echo '</table>';
        echo '</div>';
    }
    echo '</div>';
    $tell_a_friend_options['where'] = ' where action_KEY = "' . $key . '" ';
    include '../partials/_tell_a_friend_list.php';
    $sql = 'select supporter_KEY, count(supporter_KEY) as count from supporter_action where referrer_supporter_KEY >0 and supporter_KEY != referrer_supporter_KEY and action_KEY = ' . $key . ' group by supporter_KEY order by count desc';
    $Rec = $db->CacheExecute($sql) or die($db->errorMsg());
    $rec = $Rec->GetArray();
    echo '<h3>Recuritment</h3>';
    foreach ($rec as $i) {
        echo $i['count'] . ' <a href="/supporter.php?supporter_KEY=' . $i['supporter_KEY'] . '">' . get_supporter_name($i['supporter_KEY']) . '</a> ' . '<br>';
    }
    echo '<h3>Action Links</h3>';
    action_links($a['campaign_slug']);
    $sql = "select count(distinct supporter_KEY) as count from supporter_action where personal_petition=1 and action_KEY =" . $key;
    $Per = $db->CacheExecute($sql) or die($db->errorMsg() . $sql);
    $per = $Per->FetchRow();
    $sql = "select count(distinct personal_petition_supporter_KEY) as count from supporter_action where personal_petition_supporter_KEY >0 and action_KEY =" . $key;
    $Per_Ct = $db->CacheExecute($sql) or die($db->errorMsg() . $sql);
    $per_ct = $Per_Ct->FetchRow();
    if ($per['count'] > 0) {
        echo '<h3>Personal Petitions</h3>';
        echo '<strong>Petitions Started:</strong>: ' . $per['count'];
        echo '<strong>Petitions Signatures Generated:</strong>: ' . $per_ct['count'];
        $sql = "select distinct supporter_KEY  from supporter_action where personal_petition=1 and action_KEY =" . $key;
        $Pet = $db->CacheExecute($sql) or die($db->errorMsg() . $sql);
        $pet = $Pet->FetchRow();
        foreach ($pet as $i) {
            #echo '<td><a href="'.ACTION_URL.$a['campaign_slug'].'/">'.$i['supporter_KEY'].'</a></td>';
        }
    }
}