示例#1
0
         $user_result = $db->query($user_sql);
         $user_sql = "\n\t\t\t\tUPDATE\n\t\t\t\t\t`202_users_pref`\n\t\t\t\tSET\n\t\t\t\t\t`user_keyword_searched_or_bidded`='" . $mysql['user_keyword_searched_or_bidded'] . "',\n\t\t\t\t\t`user_tracking_domain`='" . $mysql['user_tracking_domain'] . "',\n\t\t\t\t\t`cache_time`='" . $mysql['cache_time'] . "',\n\t\t\t\t\t`user_daily_email`='" . $mysql['user_daily_email'] . "'\n\t\t\t\tWHERE\n\t\t\t\t\t`user_id`='" . $mysql['user_id'] . "'\n\t\t\t";
         $user_result = $db->query($user_sql);
         $html['cache_time'] = $mysql['cache_time'];
         $update_profile = true;
         registerDailyEmail($mysql['user_daily_email'], $mysql['user_timezone'], $html['install_hash']);
         //set the  session's user_timezone
         $_SESSION['user_timezone'] = $_POST['user_timezone'];
     }
 }
 if ($_POST['update_clickserver_api_key'] == '1') {
     if ($_POST['token'] != $_SESSION['token']) {
         $error['token'] = 'You must use our forms to submit data.';
     }
     if (!preg_match('/\\*/', $_POST['clickserver_api_key'])) {
         if (!clickserver_api_key_validate($_POST['clickserver_api_key'])) {
             $error['clickserver_api_key'] = 'This API Key appears invalid.';
         }
         if (!$error) {
             $mysql['user_id'] = $db->real_escape_string($_SESSION['user_id']);
             $mysql['clickserver_api_key'] = $db->real_escape_string($_POST['clickserver_api_key']);
             $user_sql = "\tUPDATE \t`202_users`\n\t\t\t\t\t\t\t\tSET     \t\t`clickserver_api_key`='" . $mysql['clickserver_api_key'] . "'\n\t\t\t\t\t\t\t\tWHERE  \t`user_id`='" . $mysql['user_id'] . "'";
             $user_result = $db->query($user_sql);
             $update_clickserver_api_key_done = true;
         }
     }
 }
 if ($_POST['change_user_api_key'] == '1') {
     if ($_POST['token'] != $_SESSION['token']) {
         $error['token'] = 'You must use our forms to submit data.';
     }
示例#2
0
function template_bottom()
{
    global $version;
    $user_data = get_user_data_feedback($_SESSION['user_id']);
    ?>
	</div>
	

	<div style="clear: both;"></div>
	<div class="row footer">
		<div class="col-xs-12">
		Thank you for marketing with <a href="http://prosper202.com" target="_blank">Prosper202</a>
		&middot; 
		<a href="/202-account/help.php">Help</a>
		&middot; 
		<a href="http://prosper202.com/apps/docs/" target="_blank">Documentation</a>
		&middot; 
		<a href="http://prosper202.com/apps/donate/" target="_blank">Donate</a>
		&middot; 
		<a href="http://support.tracking202.com" target="_blank">Forum</a>
		&middot; 
		
		<?php 
    if ($_SESSION['update_needed'] == true) {
        ?>
		 	<strong>Your Prosper202 ClickServer <?php 
        echo $version;
        ?>
 is out of date. <a href="/202-account/auto-upgrade.php">1-Click Upgrade</a> - <a href="http://my.tracking202.com/202-login.php?rd=cs202-NA==" target="_blank">Manual upgrade</a>.</strong>
		 <?php 
    } else {
        ?>
		 	Your Prosper202 ClickServer <?php 
        echo $version;
        ?>
 is up to date.
		 <?php 
    }
    ?>
		 
		 <br><br>Local time: <?php 
    echo date(DATE_RFC2822);
    ?>

		 <br><br><a rel="license" href="http://my.tracking202.com/license/" target="_blank">Copyright &copy; <?php 
    echo date("Y");
    ?>
 Blue Terra LLC. All rights reserved</a>.
	</div>
	</div>
</div>
</div>

<!-- this is the prosper202 support widget -->
<?php 
    if (clickserver_api_key_validate($user_data['api_key'], 'get', 'auth', 'db')) {
        $member_status = "Pro";
    } else {
        $member_status = "Not Pro";
    }
    ?>

<script id="IntercomSettingsScriptTag">
  window.intercomSettings = {
  	user_id: "<?php 
    echo $user_data['install_hash'];
    ?>
",
    email: "<?php 
    echo $user_data['user_email'];
    ?>
",
    user_hash: "<?php 
    echo $user_data['user_hash'];
    ?>
",
    created_at: <?php 
    echo $user_data['time_stamp'];
    ?>
,
    "widget": {
    	"activator": "#IntercomDefaultWidget"
  	},
    Active_Subscription: "<?php 
    echo $member_status;
    ?>
",
    API_key: "<?php 
    echo $user_data['api_key'];
    ?>
",
    ClickServer_Version: "<?php 
    echo $version;
    ?>
",
    PHP_Version: "<?php 
    echo phpversion();
    ?>
",
    MYSQL_Version: "<?php 
    echo mysqli_get_client_info();
    ?>
",
    app_id: "hciib3ia"
  };
</script>
<script>(function(){var w=window;var ic=w.Intercom;if(typeof ic==="function"){ic('reattach_activator');ic('update',intercomSettings);}else{var d=document;var i=function(){i.c(arguments)};i.q=[];i.c=function(args){i.q.push(args)};w.Intercom=i;function l(){var s=d.createElement('script');s.type='text/javascript';s.async=true;s.src='https://static.intercomcdn.com/intercom.v1.js';var x=d.getElementsByTagName('script')[0];x.parentNode.insertBefore(s,x);}if(w.attachEvent){w.attachEvent('onload',l);}else{w.addEventListener('load',l,false);}};})()</script>

<?php 
    if (!$user_data['modal_status']) {
        $data = getSurveyData($user_data['install_hash']);
        ?>

	<script type="text/javascript">
	  $(window).load(function(){
	    $('#survey-modal').modal({
	      backdrop: 'static',
	      show: true,
	  	})
	  });
	</script>

<!-- Start survey modal -->
      <div id="survey-modal" class="modal fade" role="dialog" aria-hidden="true">
        <div class="modal-dialog">
          <div class="modal-content">
            <div class="modal-header">
              <h4 class="modal-title">Prosper202 VIP Perks</h4>
            </div>
            <div class="modal-body">
              <span class="infotext">Wouldn't you love to have new campaign opportunities, private campaigns, business relationships, discounts and special offers and more handed to you? Now you can with the Prosper202 VIP Perk program.<br></br>
                Fill out your profile information to customize your Prosper202 VIP Perks experience. The information will be used to uniquely match you up with coupons, discounts, and enhanced payouts or exclusive offers from top Affiliate Networks, Ad Networks, Tool and Hosting providers and more.</span>
               <span id="perks-error" class="small error" style="display:none; position:absolute; right: 23px; margin-top: 39px;"><span class="fui-alert"></span> Whoops! Looks like you forget to answer some questions.</span>
		  
              <form class="form-horizontal" role="form" id="survey-form">
                <?php 
        foreach ($data['question_groups'] as $question_group) {
            ?>
		            <h6><?php 
            echo $question_group['title'];
            ?>
</h6>
		                  
		            <div class="row form_seperator">
		                <div class="col-xs-12"></div>
		            </div>

		            <?php 
            foreach ($data['questions'] as $question) {
                if ($question_group['id'] == $question['group_id']) {
                    $highlighted = false;
                    if ($question['answer']) {
                        if ($question['answer'] == 'Yes') {
                            $answer = 'Yes';
                        } else {
                            $answer = 'No';
                        }
                    } else {
                        $answer = false;
                        if ($question['highlighted']) {
                            $highlighted = true;
                        }
                    }
                    ?>
		                    <div class="form-group">
		                    <label for="<?php 
                    echo $question['id'];
                    ?>
" class="col-sm-8 control-label"><?php 
                    echo $question['name'];
                    ?>
 <?php 
                    if ($highlighted) {
                        echo '<span class="label label-important">New!</span>';
                    }
                    ?>
</label>
		                    <div class="col-sm-4">
		                      <label class="radio radio-inline">
		                        <input type="radio" name="<?php 
                    echo $question['id'];
                    ?>
" value="Yes" data-toggle="radio" required <?php 
                    if ($answer == 'Yes') {
                        echo "checked";
                    }
                    ?>
>
		                        Yes
		                      </label>
		                      <label class="radio radio-inline">
		                        <input type="radio" name="<?php 
                    echo $question['id'];
                    ?>
" value="No" data-toggle="radio" <?php 
                    if ($answer == 'No') {
                        echo "checked";
                    }
                    ?>
>
		                        No
		                      </label>
		                    </div>
		                </div>
		               <?php 
                }
                ?>
		                
		            <?php 
            }
            ?>

		        <?php 
        }
        ?>

            </div>
            <div class="modal-footer">
              <img style="display:none;left: -25px; top: 12px;" id="perks-loading" src="/202-img/loader-small.gif">
              <a href="#" class="btn btn-wide btn-p202" id="survey-form-submit">Submit answers</a>
            </div>
            </form>
          </div>
        </div>        
      </div>
<!-- End survey modal -->
<?php 
    }
    ?>
</body>
<?php 
}