Exemple #1
0
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
if (!defined('E_STRICT')) {
    define('E_STRICT', 2048);
}
error_reporting(E_ALL & ~E_NOTICE & ~E_STRICT);
@set_magic_quotes_runtime(0);
if (function_exists('date_default_timezone_set')) {
    date_default_timezone_set('America/Chicago');
}
require_once 'includes/config.php';
require_once 'includes/template.class.php';
require_once 'includes/mysql.class.php';
if (get_magic_quotes_gpc()) {
    _ArrayStripSlashes($_GET);
}
// Indicate if logged in
$C['logged_in'] = isset($_COOKIE['linkxuser']);
$DB = new DB($C['db_hostname'], $C['db_username'], $C['db_password'], $C['db_name']);
switch ($_GET['c']) {
    case '':
        DisplayIndex();
        break;
    case $C['page_new']:
        DisplayNew();
        break;
    case $C['page_top']:
        DisplayTopRated();
        break;
    case $C['page_popular']:
Exemple #2
0
function _ArrayStripSlashes(&$array)
{
    foreach ($array as $key => $value) {
        if (is_array($array[$key])) {
            _ArrayStripSlashes($array[$key]);
        } else {
            $array[$key] = stripslashes($value);
        }
    }
}