Plugin Directory

Changeset 712619


Ignore:
Timestamp:
05/13/2013 10:16:24 PM (13 years ago)
Author:
Sanskript
Message:

Updates to settings page

Location:
soldpress/branches/0.9.5A
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • soldpress/branches/0.9.5A/adapter.php

    r712192 r712619  
    9797        $this->displaylog(var_dump($this->service->GetAllLookupValues("Property")));
    9898        $this->displaylog(var_dump($this->service->GetAllLookupValues("Office")));
    99             $this->displaylog(var_dump($this->service->GetAllLookupValues("Agent")));
     99        $this->displaylog(var_dump($this->service->GetAllLookupValues("Agent")));
    100100       
    101101        $this->displaylog(var_dump($this->service->GetMetadataObjects("Property")));
  • soldpress/branches/0.9.5A/settings.php

    r712192 r712619  
    2626?>
    2727   
    28     <h2><img src="http://soldvancouver.sanskript.com/wp-content/plugins/soldpress/images/soldpress.jpg" width="32px" height="32px">
    29 SoldPress Settings</h2>
     28    <h2><img src="<?php echo plugins_url( '/images/soldpress-m.png' , __FILE__ ); ?>"" width="32px" height="32px">SoldPress Settings</h2>
    3029
    3130    <h2 class="nav-tab-wrapper"> 
    3231        <a href="?page=soldpress&tab=display_options" class="nav-tab <?php echo $active_tab == 'display_options' ? 'nav-tab-active' : ''; ?>">General Options</a> 
    3332        <a href="?page=soldpress&tab=sync_options" class="nav-tab <?php echo $active_tab == 'sync_options' ? 'nav-tab-active' : ''; ?>">Sync Options</a> 
    34         <a href="?page=soldpress&tab=debug_options" class="nav-tab <?php echo $active_tab == 'debug_options' ? 'nav-tab-active' : ''; ?>">Debug Options</a> 
     33        <a href="?page=soldpress&tab=debug_options" class="nav-tab <?php echo $active_tab == 'debug_options' ? 'nav-tab-active' : ''; ?>">Debug</a> 
    3534        </h2> 
    3635    <?php 
     
    9493                <?php submit_button(); ?> 
    9594            </form>
    96        
    97         <?php if (get_option('sc-status' ) == true) { ?>
    98             <div id="message" class="updated"><p>CREA Data Sync Active</p>
    99                <ul>
    100                     <li>Status : <?php echo get_option('sc-status' ) ?></li>
    101                     <li>Start : <?php echo get_option('sc-sync-start' ) ?></li>
    102                     <li>End : <?php echo get_option('sc-sync-end' ) ?></li>
    103                     <li>Error : <?php echo get_option('sc-sync-error' ) ?> </li>     
    104                     <li>Discription : <?php echo get_option('sc-sync-status' ) ?> </li>
    105                 </ul>
    106             </div>
    107         <?php } else {?>   
    108             <div id="message" class="updated"><p>No Sync Active</p></div>
    109         <?php } ?> 
    11095        <h3 class="title">Schedule</h3>
     96       
    11197        <table class="widefat">
    11298            <thead>
     
    132118            </tfoot>
    133119            <tbody>
    134    
    135     <?php $time_slots = _get_cron_array();
    136        
    137         $tr_class = "";
    138             foreach ($time_slots as $key => $jobs) {   
    139                 foreach ($jobs as $job => $value) {
    140                     if($job == 'soldpress_photo_sync' || $job == 'soldpress_listing_sync'){
    141                             echo '<tr>';
    142                         //  echo '<th scope="row" class="check-column"><input type="checkbox" name="schedules[]" class="entries" value="1"></th>';
    143                             echo '<td><strong>'.$job.'</strong><div class="row-actions" style="margin:0; padding:0;"><a href="/wp-admin/admin.php?page=pluginbuddy_backupbuddy-scheduling&amp;edit=1">Run Now</a> | <a href="/wp-admin/admin.php?page=pluginbuddy_backupbuddy-scheduling&amp;edit=1">Disable</a></div></td>';
    144                            
    145                             echo '<td>'.date("r", $key).'</td>';                           
    146                             $schedule = $value[key($value)];
    147                             echo '<td>'.(isset($schedule["schedule"]) ? $schedule["schedule"] : "").'</td>';
    148                             echo '<td class="aright">'.(isset($schedule["interval"]) ? $schedule["interval"] : "").'</td>';                         
    149                             echo '<td class="aright">'. Date('r',get_option('sc-'.$job.'-start' )) ;
    150                             echo '</td>';
    151                             echo '<td class="aright">'. Date('r',get_option('sc-'.$job.'-end' )) ;
    152                             echo '</td>';
    153                             echo '</tr>';
    154                             if ($tr_class == "")
    155                                 $tr_class = "entry-row alternate ";
    156                             else
    157                                 $tr_class = "entry-row";
     120                <?php $time_slots = _get_cron_array();     
     121                    $tr_class = "";
     122                        foreach ($time_slots as $key => $jobs) {   
     123                            foreach ($jobs as $job => $value) {
     124                                if($job == 'soldpress_photo_sync' || $job == 'soldpress_listing_sync'){
     125                                        echo '<tr>';
     126                                        //echo '<th scope="row" class="check-column"><input type="checkbox" name="schedules[]" class="entries" value="1"></th>';
     127                                        echo '<td><strong>'.$job.'</strong><div class="row-actions" style="margin:0; padding:0;"><a href="/wp-admin/options-general.php?page=soldpress&tab=sync_options&spa=runevt&job='.$job.'">Run Now</a> || <a href="/wp-admin/options-general.php?page=soldpress&tab=sync_options">Disable</a></div></td>';
     128                                       
     129                                        echo '<td>'.date("r", $key).'</td>';                           
     130                                        $schedule = $value[key($value)];
     131                                        echo '<td>'.(isset($schedule["schedule"]) ? $schedule["schedule"] : "").'</td>';
     132                                        echo '<td class="aright">'.(isset($schedule["interval"]) ? $schedule["interval"] : "").'</td>';                         
     133                                        echo '<td class="aright">'. Date('r',get_option('sc-'.$job.'-start' )) ;
     134                                        echo '</td>';
     135                                        echo '<td class="aright">'. Date('r',get_option('sc-'.$job.'-end' )) ;
     136                                        echo '</td>';
     137                                        echo '</tr>';
     138                                        if ($tr_class == "")
     139                                            $tr_class = "entry-row alternate ";
     140                                        else
     141                                            $tr_class = "entry-row";
     142                                        }
    158143                            }
    159                 }
    160             }
    161 ?>
     144                        }
     145                ?>
    162146            </tbody>
    163         </table>
    164         <h3 class="title">Advance</h3>
    165         <form method="post" id="sync_connection">     
    166             <?php submit_button('Manual Sync', 'secondary', 'sync', false); ?>
    167             <?php submit_button('Clear Listings', 'secondary', 'delete', false); ?>
    168         </form>
    169     <div>
     147        </table>       
    170148    <?php } ?>
    171    
    172149    <?php if( $active_tab == 'debug_options' ) {  ?>
    173150    <a href="/wp-content/uploads/soldpress/soldpress-log.txt">debug log</a>
     
    200177                </div>
    201178            </div>
     179            <h3 class="title">Advance</h3>
     180                    <form method="post" id="sync_connection">     
     181                        <?php submit_button('Manual Sync', 'secondary', 'sync', false); ?>
     182                        <?php submit_button('Clear Listings', 'secondary', 'delete', false); ?>
     183                    </form>
     184            <?php if (get_option('sc-status' ) == true) { ?>
     185            <div id="message" class="updated"><p>CREA Data Sync Active</p>
     186               <ul>
     187                    <li>Status : <?php echo get_option('sc-status' ) ?></li>
     188                    <li>Start : <?php echo get_option('sc-sync-start' ) ?></li>
     189                    <li>End : <?php echo get_option('sc-sync-end' ) ?></li>
     190                    <li>Error : <?php echo get_option('sc-sync-error' ) ?> </li>     
     191                    <li>Discription : <?php echo get_option('sc-sync-status' ) ?> </li>
     192                </ul>
     193            </div>
     194        <?php } else {?>   
     195            <div id="message" class="updated"><p>No Sync Active</p></div>
     196        <?php } ?>
    202197    <?php } ?>
    203 
    204     <div>&copy; 2013 Sanskript Solution, Inc.</div>
    205 
     198        <p>
     199            <div>&copy; 2013 Sanskript Solution, Inc.</div>
     200        </p>
    206201       
    207202    <?php
    208 
    209         add_action( 'in_admin_footer', 'admin_footer' );
    210         /**
    211          * Adds Footer links. Based on http://striderweb.com/nerdaphernalia/2008/06/give-your-wordpress-plugin-credit/
    212          */
    213         function admin_footer() {
    214             $plugin_data = get_plugin_data( __FILE__ );
    215             printf('%1$s ' . __("plugin", 'SoldPress') .' | ' . __("Version", 'SoldPress') . ' %2$s | '. __('by', 'SoldPress') . ' %3$s<br />', $plugin_data['Title'], $plugin_data['Version'], $plugin_data['Author']);
    216             printf('%1$s ' . __("plugin", 'soldpress') .' | ' . __("Version", 'soldpress') . ' %2$s | '. __('by', 'soldpress') . ' %3$s<br />', "SoldPress", "0.5A", "Replace");
    217         }
    218     //$date = new DateTime();
    219     //echo $date->getTimestamp();
    220         //We Do The Get Before
    221203        if (isset($_GET["spa"])) {
    222204            $sp_action = $_GET["spa"];
    223205            if ($sp_action != '') {
    224                     switch ($$sp_action) {
     206                    switch ($sp_action) {
    225207                        case "unsevt":
    226208                         
     
    234216                            exit();
    235217                            break;
     218                         case "testevt":
     219                            $adapter= new soldpress_adapter();
     220                            if($adapter->connect())
     221                            {
     222                                return $adapter-> logserverinfo();     
     223                            }
     224                            exit();
     225                            break;
    236226                    }
    237227            }
     
    264254    }
    265255
    266     ?>
     256?>
  • soldpress/branches/0.9.5A/soldpress.php

    r712192 r712619  
    123123}
    124124
     125    add_action( 'in_admin_footer', 'admin_footer' );
     126        /**
     127         * Adds Footer links. Based on http://striderweb.com/nerdaphernalia/2008/06/give-your-wordpress-plugin-credit/
     128         */
     129        function admin_footer() {
     130            $plugin_data = get_plugin_data( __FILE__ );
     131            printf('%1$s ' . __("plugin", 'SoldPress') .' | ' . __("Version", 'SoldPress') . ' %2$s | '. __('by', 'SoldPress') . ' %3$s<br />', $plugin_data['Title'], $plugin_data['Version'], $plugin_data['Author']);
     132        }
     133
    125134?>
Note: See TracChangeset for help on using the changeset viewer.