Location: PHPKode > scripts > ColorShop > colorshop/classes/integrations/shareyourcart/views/admin-page.php
<?php if ( ! class_exists( 'ShareYourCartBase', false ) ) die( 'Access Denied' );

$GLOBALS['hide_save_button'] = true;

$wcIntegration = $html; //the object is sent under the $html parameter

//since this is a post, and is related to recovering or creating a new account, perform some special operations
if ($refresh || ($_SERVER['REQUEST_METHOD'] == 'POST' && !empty( $_REQUEST['syc-account'] ))){

	$redirect = remove_query_arg( 'saved' );
	$redirect = remove_query_arg( 'cs_error', $redirect );
	$redirect = remove_query_arg( 'cs_message', $redirect );

	//remove the syc-account argument only if the SDK commanded as such
	if($refresh) $redirect = remove_query_arg( 'syc-account', $redirect );

	if ( !empty($error_message) ) $redirect = add_query_arg( 'cs_error', urlencode( esc_attr( $error_message ) ), $redirect );

	wp_safe_redirect( $redirect );

<div class="wrap">

<?php if ( $show_header ) : ?>

	<?php echo $this->getUpdateNotification(); ?>

	<?php if ( ! $this->getClientId() && ! $this->getAppKey() ) : //show the get started message ?>

		<div id="cs_get_started">
			<span class="main"><?php _e('Setup your ShareYourCart account', 'colorshop'); ?></span>
			<span><?php echo $wcIntegration->method_description; ?></span>
			<p><a href="<?php echo add_query_arg( 'syc-account', 'create', admin_url( 'admin.php?page=colorshop&tab=integration&section=shareyourcart' ) ); ?>" class="button button-primary"><?php _e('Create an account', 'colorshop'); ?></a> <a href="<?php echo add_query_arg( 'syc-account', 'recover', admin_url( 'admin.php?page=colorshop&tab=integration&section=shareyourcart' ) ); ?>" class="button"><?php _e('Can\'t access your account?', 'colorshop'); ?></a></p>

	<?php else: ?>

			<a href="http://www.shareyourcart.com" target="_blank" title="Shareyourcart" class="shareyourcart-logo">
				<img src="<?php echo $this->createUrl(dirname(__FILE__).'/../sdk/img/shareyourcart-logo.png'); ?>"/>
		<?php echo wpautop( $wcIntegration->method_description );?>

	<?php endif; ?>

<?php endif; ?>

	<?php if(!empty($status_message) || !empty($error_message)): ?>
	<div class="updated settings-error"><p><strong>
			$message = @$error_message;

			//is there a status message?
				//put the status message on a new line
				if(!empty($message)) $message .= "<br /><br />";

				$message .= $status_message;

			echo $message;
	<?php endif; ?>

    <h3>Account Options</h3>
    <div id="acount-options">
		<table class="form-table">
        	<tr valign="top">
        		<th class="titledesc" scope="row">
        			<?php echo SyC::t('sdk','API Status:'); ?>
		            <?php if ( $this->isActive() ) echo SyC::t('sdk','Enabled'); else echo SyC::t('sdk','Disabled'); ?>
        		<td class="forminp">
        			<?php if($this->isActive()) : ?>
			            <input class="button" type="submit" value="<?php echo SyC::t('sdk','Disable'); ?>" name="disable-API" />
			        <?php else :?>
			            <input class="button" type="submit" value="<?php echo SyC::t('sdk','Enable'); ?>" name="enable-API" />
			        <?php endif;?>
            <tr valign="top">
                <th class="titledesc" scope="row"><?php echo SyC::t('sdk','Client ID'); ?></th>
                <td class="forminp"><input type="text" name="client_id" id="client_id" class="regular-text" value="<?php echo $this->getClientId(); ?>"/></td>
            <tr valign="top">
                <th class="titledesc" scope="row"><?php echo SyC::t('sdk','App Key'); ?></th>
                <td class="forminp"><input type="text" name="app_key" id="app_key" class="regular-text" value="<?php echo $this->getAppKey(); ?>"/></td>
            <?php if($this->isActive()) : ?>
            <tr valign="top">
            	<th class="titledesc" scope="row"><?php echo SyC::t('sdk','Configuration'); ?></th>

	            	<a href="<?php echo $this->SHAREYOURCART_CONFIGURE; ?>?app_key=<?php echo $this->getAppKey(); ?>&amp;client_id=<?php echo $this->getClientId(); ?>&amp;email=<?php echo $this->getAdminEmail(); ?>" class="button" target="_blank"><?php _e('Configure', 'colorshop'); ?></a>

	            	<p class="description"><?php echo SyC::t('sdk','You can choose how much of a discount to give (in fixed amount, percentage, or free shipping) and to which social media channels it should it be applied. You can also define what the advertisement should say, so that it fully benefits your sales.'); ?></p>

            <?php endif;?>

        <div class="submit">
        	<input type="submit" class="button button-primary" name="syc-account-form" value="<?php _e('Save changes', 'colorshop'); ?>" />

Return current item: ColorShop