This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$db_name = "sport24"; | |
$db_user = "root"; | |
$db_pass = ""; | |
$db_host = "localhost"; | |
try { | |
$db = new PDO("mysql:host=".$db_host.";dbname=".$db_name."", $db_user, $db_pass); | |
$db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
^\s*$ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//Validation | |
$error = ""; | |
//Source Name | |
if ($name == "" or $name == "Name") { | |
$error = "<li>Please enter your name</li>"; | |
} | |
if ($surname == "" or $surname == "Surname") { | |
$error .= "<li>Please enter your surname</li>"; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://www.facebook.com/dialog/pagetab?app_id=YOUR_APP_ID&next=YOUR_URL |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function oilcouncil_breadcrumb($variables) { | |
$breadcrumb = $variables['breadcrumb']; | |
if (!empty($breadcrumb)) { | |
return '<div class="breadcrumb">'. implode('<img src="' . base_path() . path_to_theme() . '/images/img_breadcrumb_sep.gif" />', $breadcrumb) .'</div>'; | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function oilcouncil_menu_link(array $variables) { | |
$element = $variables['element']; | |
$sub_menu = ''; | |
if ($element['#below']) { | |
$sub_menu = "<div>".drupal_render($element['#below'])."</div>"; | |
} | |
$output = l($element['#title'], $element['#href'], $element['#localized_options']); | |
return '<li' . drupal_attributes($element['#attributes']) . '>' . $output . $sub_menu . "</li>\n"; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function oilcouncil_panels_default_style_render_region($vars) { | |
$output = ''; | |
$output .= implode('', $vars['panes']); | |
return $output; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://www.facebook.com/dialog/pagetab?app_id=YOUR_APP_ID&next=YOUR_URL |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (!empty($breadcrumb)) { | |
$crumbs = '<ul class="breadcrumb">'; | |
$lastItem = count($breadcrumb) - 1; | |
foreach($breadcrumb as $index=>$value) { | |
if ($index == $lastItem) { | |
$crumbs .= '<li class="breadcrumb-last">'.t($value).'</li>'; | |
} | |
else { | |
$crumbs .= '<li>'.t($value).'</li>'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php print $field_email[0]['value']; ?> |