Ignore:
Timestamp:
Dec 18, 2005 12:16:03 AM (18 years ago)
Author:
scdev
Message:

detabbed all files ;P

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bin/module_maker/skel/public.php

    r41 r42  
    11<?php
    22/**
    3  * %PUBLIC_SCRIPT% 
     3 * %PUBLIC_SCRIPT%
    44 * Code by Strangecode :: www.strangecode.com :: This document contains copyrighted information
    55 *
     
    1818// Titles and navigation header.
    1919$nav->addPage(_("%TITLE%"), $_SERVER['PHP_SELF']);
    20 $nav->setFeature(array('title'=>true)); 
     20$nav->setFeature(array('title'=>true));
    2121
    2222// Instantiate page numbers. Total items are set and calculation is done in the getRecordList function.
     
    3232
    3333if (getFormData('%PRIMARY_KEY%', false)) {
    34    
     34
    3535    // Get requested record.
    3636    $qid = DB::query("
     
    5252        WHERE %PRIMARY_KEY% = '" . addslashes(getFormData('%PRIMARY_KEY%')) . "'
    5353    ");
    54        
     54
    5555    // Set title and main template.
    5656    $nav->addPage($item['<##>']);
     
    5858
    5959} else {
    60    
     60
    6161    // Get the DEFAULT list.
    6262    $%NAME_SINGULAR%_list = array();
    6363    $qid = DB::query("
    64         SELECT * 
    65         FROM %DB_TBL% 
    66         WHERE publish = 'true' 
     64        SELECT *
     65        FROM %DB_TBL%
     66        WHERE publish = 'true'
    6767        " . $so->getSortOrderSQL() . "
    6868        LIMIT 100
     
    7171        $%NAME_SINGULAR%_list[] = $row;
    7272    }
    73    
     73
    7474    // Set page numbers for default list.
    7575    $page->setTotalItems(sizeof($%NAME_SINGULAR%_list));
    7676    $page->calculate();
    77    
     77
    7878
    7979    // Get the FEATURED list.
    8080    $featured_list = array();
    8181    $qid = DB::query("
    82         SELECT * 
    83         FROM %DB_TBL% 
     82        SELECT *
     83        FROM %DB_TBL%
    8484        WHERE publish = 'true'
    8585        AND featured = 'true'
     
    8989        $featured_list[] = $row;
    9090    }
    91    
     91
    9292    // Get the POPULAR list.
    9393    $popular_list = array();
    9494    $qid = DB::query("
    95         SELECT * 
    96         FROM %DB_TBL% 
    97         WHERE publish = 'true' 
     95        SELECT *
     96        FROM %DB_TBL%
     97        WHERE publish = 'true'
    9898        ORDER BY hit_count DESC LIMIT 10
    9999    ");
     
    101101        $popular_list[] = $row;
    102102    }
    103    
     103
    104104    // Get the RECENT list.
    105105    $recent_list = array();
    106106    $qid = DB::query("
    107         SELECT * 
    108         FROM %DB_TBL% 
    109         WHERE publish = 'true' 
     107        SELECT *
     108        FROM %DB_TBL%
     109        WHERE publish = 'true'
    110110        ORDER BY added_datetime DESC LIMIT 10
    111111    ");
     
    113113        $recent_list[] = $row;
    114114    }
    115    
     115
    116116    // Set main template.
    117117    $main_template = '%PUBLIC_LIST_TEMPLATE%';
    118 }   
     118}
    119119
    120120// We have the data, and no errors, so here come the templates.
Note: See TracChangeset for help on using the changeset viewer.