| 1 |
<?php |
<?php |
| 2 |
function internet_center_regions() { |
|
|
return array( |
|
|
'right' => t('right sidebar'), |
|
|
'content' => t('content'), |
|
|
'header' => t('header'), |
|
|
'footer' => t('footer') |
|
|
); |
|
|
} |
|
| 3 |
function internet_center_login_box() { |
function internet_center_login_box() { |
| 4 |
global $user; |
global $user; |
| 5 |
|
|
| 6 |
if (!$user->uid) { |
if (!$user->uid) { |
| 7 |
//$output = '<p><b>You are not Logged in!</b> <a href="#">Log in</a> to check your messages.<br />'; |
$form['#action'] = url($_GET['q'], array('query' => drupal_get_destination())); |
|
//$output .= 'Do you want to <a href="#">Log in</a> or <a href="#">register</a>?</p>'; |
|
|
$form['#action'] = url($_GET['q'], drupal_get_destination()); |
|
| 8 |
$form['#id'] = 'user-login-form'; |
$form['#id'] = 'user-login-form'; |
| 9 |
$form['name'] = array('#type' => 'textfield', |
$form['name'] = array('#type' => 'textfield', |
| 10 |
'#title' => t('Username'), |
'#title' => t('Username'), |
| 47 |
} |
} |
| 48 |
} |
} |
| 49 |
|
|
|
function phptemplate_menu_tree($pid = 1) { |
|
|
if ($tree = menu_tree($pid)) { |
|
|
$output .= "\n<ul>\n"; |
|
|
if (function_exists('base_path')) { |
|
|
$base_path = base_path(); |
|
|
} |
|
|
$url = $base_path . 'node'; |
|
|
if ($pid == 1) { |
|
|
$output .= "<li><a href=\"" . $url . "\">home</a></li>"; |
|
|
}; |
|
|
$output .= $tree; |
|
|
$output .= "\n</ul>\n"; |
|
|
return $output; |
|
|
} |
|
|
} |
|
|
function phptemplate_menu_item($mid, $children = '', $leaf = TRUE) { |
|
|
//return '<li class="'. ($leaf ? 'leaf' : ($children ? 'expanded' : 'collapsed')) .'">'. menu_item_link($mid) . $children ."</li>\n"; |
|
|
return '<li>'. menu_item_link($mid) . $children ."</li>\n"; |
|
|
} |
|
|
function phptemplate_system_themes($form) { |
|
|
foreach (element_children($form) as $key) { |
|
|
$row = array(); |
|
|
if (is_array($form[$key]['description'])) { |
|
|
$row[] = drupal_render($form[$key]['description']) . drupal_render($form[$key]['screenshot']) ; |
|
|
$row[] = array('data' => drupal_render($form['status'][$key]), 'align' => 'center'); |
|
|
if ($form['theme_default']) { |
|
|
$row[] = array('data' => drupal_render($form['theme_default'][$key]) . drupal_render($form[$key]['operations']), 'align' => 'center'); |
|
|
} |
|
|
} |
|
|
$rows[] = $row; |
|
|
} |
|
|
$header = array(t('Name/Screenshot'), t('Enabled'), t('Default')); |
|
|
$output = theme('table', $header, $rows); |
|
|
$output .= drupal_render($form); |
|
|
return $output; |
|
|
} |
|
|
function phptemplate_system_user($form) { |
|
|
foreach (element_children($form) as $key) { |
|
|
$row = array(); |
|
|
if (is_array($form[$key]['description'])) { |
|
|
$row[] = drupal_render($form[$key]['description']) . drupal_render($form[$key]['screenshot']); |
|
|
$row[] = array('data' => drupal_render($form['theme'][$key]), 'align' => 'center'); |
|
|
} |
|
|
$rows[] = $row; |
|
|
} |
|
| 50 |
|
|
|
$header = array(t('Name/Screenshot'), t('Selected')); |
|
|
$output = theme('table', $header, $rows); |
|
|
return $output; |
|
|
} |
|
| 51 |
?> |
?> |