Ver Mensaje Individual
  #11 (permalink)  
Antiguo 10/03/2010, 16:28
AlexJB
 
Fecha de Ingreso: marzo-2010
Mensajes: 16
Antigüedad: 14 años, 1 mes
Puntos: 0
Respuesta: Como insertar este codigo a un archivo php.

lo anterior seria

Código PHP:
Ver original
  1. <body>';
  2.  
  3.     echo '
  4.     <div class="tborder" ', $context['browser']['needs_size_fix'] && !$context['browser']['is_ie6'] ? ' style="width: 100%;"' : '', '>
  5.         <table width="100%" cellpadding="0" cellspacing="0" border="0">
  6.             <tr>
  7.                 <td class="catbg" height="32">';
  8.  
  9.                 if (empty($settings['header_logo_url']))
  10.                 echo '
  11.                     <span style="font-family: Verdana, sans-serif; font-size: 140%; ">Climamas.com
  12.  </span>';
  13.                 else
  14.                 echo '
  15.                     <img src="', $settings['header_logo_url'], '" style="margin: 4px;" alt="', $context['forum_name'], '" />';
  16.  
  17.               echo '
  18.                     </td>
  19.                 </td>
  20.             </tr>
  21.         </table>';
  22.        
  23.  
  24.  
  25.     // display user name
  26.     echo '
  27.         <table width="100%" cellpadding="0" cellspacing="0" border="0" >
  28.             <tr>';
  29.  
  30.     if($context['user']['is_logged'])
  31.         echo '
  32.                 <td class="titlebg2" height="32">
  33.                     <span style="font-size: 130%;"> ', $txt['hello_member_ndt'], ' <b>', $context['user']['name'] , '</b></span>
  34.                 </td>';
  35.  
  36.     // display the time
  37.     echo '
  38.                 <td class="titlebg2" height="32" align="right">
  39.                     <span class="smalltext">' , $context['current_time'], '</span>';
  40.  
  41.     // this is the upshrink button for the user info section
  42.     echo '
  43.                     <a href="#" onclick="shrinkHeader(!current_header); return false;"><img id="upshrink" src="', $settings['images_url'], '/', empty($options['collapse_header']) ? 'upshrink.gif' : 'upshrink2.gif', '" alt="*" title="', $txt['upshrink_description'], '" align="bottom" style="margin: 0 1ex;" /></a>
  44.                 </td>
  45.             </tr>
  46.             <tr id="upshrinkHeader"', empty($options['collapse_header']) ? '' : ' style="display: none;"', '>
  47.                 <td valign="top" colspan="2">
  48.                     <table width="100%" class="bordercolor" cellpadding="8" cellspacing="1" border="0" style="margin-top: 1px;">
  49.                         <tr>';
  50.  
  51.     if (!empty($context['user']['avatar']))
  52.         echo '
  53.                             <td class="windowbg" valign="middle">', $context['user']['avatar']['image'], '</td>';
  54.  
  55.     echo '
  56.                             <td colspan="2" width="100%" valign="top" class="windowbg2"><span class="middletext">';
  57.                            
  58.  
  59.     // If the user is logged in, display stuff like their name, new messages, etc.
  60.     if ($context['user']['is_logged'])
  61.     {
  62.         echo '
  63.                                 <a href="', $scripturl, '?action=unread">', $txt['unread_since_visit'], '</a> <br />
  64.                                 <a href="', $scripturl, '?action=unreadreplies">', $txt['show_unread_replies'], '</a><br />';
  65.  
  66.     }
  67.     // Otherwise they're a guest - send them a lovely greeting...
  68.     else
  69.         echo $txt['welcome_guest'];
  70.  
  71.     // Now, onto our second set of info, are they logged in again?
  72.     if ($context['user']['is_logged'])
  73.     {
  74.         // Is the forum in maintenance mode?
  75.         if ($context['in_maintenance'] && $context['user']['is_admin'])
  76.             echo '
  77.                                 <b>', $txt[616], '</b><br />';
  78.  
  79.         // Are there any members waiting for approval?
  80.         if (!empty($context['unapproved_members']))
  81.             echo '
  82.                                 ', $context['unapproved_members'] == 1 ? $txt['approve_thereis'] : $txt['approve_thereare'], ' <a href="', $scripturl, '?action=viewmembers;sa=browse;type=approve">', $context['unapproved_members'] == 1 ? $txt['approve_member'] : $context['unapproved_members'] . ' ' . $txt['approve_members'], '</a> ', $txt['approve_members_waiting'], '<br />';
  83.  
  84.         // Show the total time logged in?
  85.         if (!empty($context['user']['total_time_logged_in']))
  86.         {
  87.             echo '
  88.                                 ', $txt['totalTimeLogged1'];
  89.  
  90.             // If days is just zero, don't bother to show it.
  91.             if ($context['user']['total_time_logged_in']['days'] > 0)
  92.                 echo $context['user']['total_time_logged_in']['days'] . $txt['totalTimeLogged2'];
  93.  
  94.             // Same with hours - only show it if it's above zero.
  95.             if ($context['user']['total_time_logged_in']['hours'] > 0)
  96.                 echo $context['user']['total_time_logged_in']['hours'] . $txt['totalTimeLogged3'];
  97.  
  98.             // But, let's always show minutes - Time wasted here: 0 minutes ;).
  99.             echo $context['user']['total_time_logged_in']['minutes'], $txt['totalTimeLogged4'], '<br />';
  100.         }
  101.         echo '
  102.        
  103.                                 </center>  
  104. <script  language="javascript"  type="text/javascript">iwsrcplus="http://codenew.impresionesweb.com/r/banner_iw.php?idrotador=61508&tamano=728x90&lgid="+((new Date()).getTime() % 2147483648) + Math.random(); document.write("<scr"+"ipt language=javascript  type=text/javascript src="+iwsrcplus+"></scr"+"ipt>");</script><noscript><iframe src="http://alt.impresionesweb.com/noscript.php?tam=728x90&idp=61508&ref=61508&cod=101656" width="728" height="90" frameborder="0" marginheight="0" marginwidth="0" scrolling="no"></iframe></noscript>
  105. </center>                                                                              
  106. </span>';
  107.  
  108.     }
  109.     // Otherwise they're a guest - this time ask them to either register or login - lazy bums...
  110.     else
  111.     {
  112.         echo '              </span>
  113.                                 <script language="JavaScript" type="text/javascript" src="', $settings['default_theme_url'], '/sha1.js"></script>
  114.  
  115.                                 <form action="', $scripturl, '?action=login2" method="post" accept-charset="', $context['character_set'], '" class="middletext" style="margin: 3px 1ex 1px 0;"', empty($context['disable_login_hashing']) ? ' onsubmit="hashLoginPassword(this, \'' . $context['session_id'] . '\');"' : '', '>
  116.                                     <input type="text" name="user" size="10" /> <input type="password" name="passwrd" size="10" />
  117.                                     <select name="cookielength">
  118.                                         <option value="60">', $txt['smf53'], '</option>
  119.                                         <option value="1440">', $txt['smf47'], '</option>
  120.                                         <option value="10080">', $txt['smf48'], '</option>
  121.                                         <option value="43200">', $txt['smf49'], '</option>
  122.                                         <option value="-1" selected="selected">', $txt['smf50'], '</option>
  123.                                     </select>
  124.                                     <input type="submit" value="', $txt[34], '" /><br />
  125.                                     <span class="middletext">', $txt['smf52'], '</span>
  126.                                     <input type="hidden" name="hash_passwrd" value="" />
  127.                                 </form>';
  128.     }
  129.  
  130.     echo '
  131.                             </td>
  132.                         </tr>
  133.                     </table>
  134.                 </td>
  135.             </tr>
  136.         </table>';
  137.  
  138.     echo '
  139.         <table id="upshrinkHeader2"', empty($options['collapse_header']) ? '' : ' style="display: none;"', ' width="100%" cellpadding="4" cellspacing="0" border="0">
  140.             <tr>';
  141.  
  142.  
  143.  
  144.  
  145. // Show a linktree. This is that thing that shows "My Community | General Category | General Discussion"..
  146. function theme_linktree()
  147. {
  148.     global $context, $settings, $options;
  149.  
  150.     echo '<div class="nav" style="font-size: smaller; margin-bottom: 2ex; margin-top: 2ex;">';
  151.  
  152.     // Each tree item has a URL and name. Some may have extra_before and extra_after.
  153.     foreach ($context['linktree'] as $link_num => $tree)
  154.     {
  155.         // Show something before the link?
  156.         if (isset($tree['extra_before']))
  157.             echo $tree['extra_before'];
  158.  
  159.         // Show the link, including a URL if it should have one.
  160.         echo '<b>', $settings['linktree_link'] && isset($tree['url']) ? '<a href="' . $tree['url'] . '" class="nav">' . $tree['name'] . '</a>' : $tree['name'], '</b>';
  161.  
  162.         // Show something after the link...?
  163.         if (isset($tree['extra_after']))
  164.             echo $tree['extra_after'];
  165.  
  166.         // Don't show a separator for the last one.
  167.         if ($link_num != count($context['linktree']) - 1)
  168.             echo '&nbsp;>&nbsp;';
  169.     }
  170.  
  171.     echo '</div>';
  172. }
  173.  
  174. // Show the menu up top. Something like [home] [help] [profile] [logout]...
  175. function template_menu()
  176. {
  177.     global $context, $settings, $options, $scripturl, $txt;
  178.  
  179.     // Work out where we currently are.
  180.     $current_action = 'home';
  181.     if (in_array($context['current_action'], array('admin', 'ban', 'boardrecount', 'cleanperms', 'detailedversion', 'dumpdb', 'featuresettings', 'featuresettings2', 'findmember', 'maintain', 'manageattachments', 'manageboards', 'managecalendar', 'managesearch', 'membergroups', 'modlog', 'news', 'optimizetables', 'packageget', 'packages', 'permissions', 'pgdownload', 'postsettings', 'regcenter', 'repairboards', 'reports', 'serversettings', 'serversettings2', 'smileys', 'viewErrorLog', 'viewmembers')))
  182.         $current_action = 'admin';
  183.     if (in_array($context['current_action'], array('search', 'admin', 'calendar', 'profile', 'mlist', 'register', 'login', 'help', 'pm')))
  184.         $current_action = $context['current_action'];
  185.     if ($context['current_action'] == 'search2')
  186.         $current_action = 'search';
  187.     if ($context['current_action'] == 'theme')
  188.         $current_action = isset($_REQUEST['sa']) && $_REQUEST['sa'] == 'pick' ? 'profile' : 'admin';
  189.  
  190.     // Are we using right-to-left orientation?
  191.     if ($context['right_to_left'])
  192.     {
  193.         $first = 'last';
  194.         $last = 'first';
  195.     }
  196.     else
  197.     {
  198.         $first = 'first';
  199.         $last = 'last';
  200.     }
  201.  
  202.     // Show the start of the tab section.
  203.     echo '
  204.             <table cellpadding="0" cellspacing="0" border="0" style="margin-left: 200px;">
  205.                 <tr>
  206.                     <td class="maintab_' , $first , '">&nbsp;</td>';