il box è cosi:
e io lo vorrei cosi:
come posso fare??
grazie mille
Moderatore: mod Generali
Codice: Seleziona tutto
<?php
/*
$Id: information.php,v 1.5 2002/01/11 22:04:06 dgw_ Exp $
osCommerce, Open Source E-Commerce Solutions
http://www.oscommerce.com
Copyright (c) 2001 osCommerce
Released under the GNU General Public License
*/
?>
<!-- information //-->
<tr>
<td>
<?php
require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_LOGIN_WELCOME);
if (tep_session_is_registered('customer_id')) {
$info_box_contents = array();
$info_box_contents[] = array('align' => 'left',
'text' => BOX_HEADING_MEMBERLOGGED_IN
);
$db=DB_DATABASE;
$select="select customers_firstname from customers where customers_id=\"$customer_id\"";
$result=mysql_db_query($db,$select);
$res=mysql_fetch_object($result);
$in_out_action = "<center>";
$in_out_action.= LOGIN_BOX_WELCOME_TEXT;
$in_out_action.= "<br>$res->customers_firstname <br><br>";
$in_out_action.='<a href="'.tep_href_link(FILENAME_ACCOUNT, '', 'SSL').'">';
$in_out_action.= LOGIN_BOX_WELCOME_MYACCOUNT;
$in_out_action.="</a><br>";
$in_out_action.='<a href="'.tep_href_link(FILENAME_LOGOFF, '', 'NONSSL').'">';
$in_out_action.= LOGIN_BOX_WELCOME_LOGOUT;
$in_out_action.="</a></center>";
} else {
$info_box_contents = array();
$info_box_contents[] = array('align' => 'left',
'text' => BOX_HEADING_MEMBERLOGIN
);
$in_out_action = '
<form name="login" action="login.php?action=process" method="post">
<center>
<table border="0" cellpadding="0" cellspacing="0" class="smallText" >
<tr >
<td width="100%" height="16" class="smallText">
<p align="center">';
$in_out_action.= LOGIN_BOX_WELCOME_EMAILADDRESS;
$in_out_action.= '</td>
</tr>
<tr>
<td width="100%" height="16" class="smallText">
<p align="center">
<input maxLength="96" name="email_address"size="12">
</td>
</tr>
<tr>
<td width="100%" height="16" class="smallText">
<p align="center">';
$in_out_action.=LOGIN_BOX_WELCOME_PASSWORD;
$in_out_action.='</font></td>
</tr>
<tr>
<td width="100%" height="19">
<p align="center"><b>
<font size="1" class="smallText"> <input type="password" maxLength="40" value name="password" size="12"></b>
</td>
</tr>
<tr>
<td width="100%" height="1" class="smallText">
<p align="center">';
$in_out_action.='<br><input type="submit" value="';
$in_out_action.=LOGIN_BOX_WELCOME_LOGIN;
$in_out_action.='" name="Submit">';
//Forgotten Password
$in_out_action.= '<br>';
$in_out_action.='<a class="smallText" href="';
$in_out_action.=tep_href_link(FILENAME_PASSWORD_FORGOTTEN);
$in_out_action.='">';
$in_out_action.= LOGIN_BOX_PASSWORD_FORGOTTEN;
$in_out_action.='</a>
</td>
</tr>
<tr>
<td width="100%" height="1" class="smallText">
<p align="center">';
//create account
$in_out_action.= '<br>';
$in_out_action.='<a class="smallText" href="';
$in_out_action.=tep_href_link(FILENAME_CREATE_ACCOUNT);
$in_out_action.='">';
$in_out_action.= LOGIN_BOX_CREATE_ACCOUNT;
$in_out_action.='</a>
</td>
</tr>
</table>
</form>
';
}
new infoBoxHeading($info_box_contents, false, false);
$info_box_contents = array();
$info_box_contents[] = array('align' => 'left',
'params' => 'class="smallText" valign="top"',
'text' => $in_out_action
);
new infoBox($info_box_contents);
?></td></tr>
<!-- information_eof //-->
Ciao,berte ha scritto:cioe??nn ho capito cosa dovrei fare....
cmq ho provato a smanettare col codice dentro il file boxes in classes ma nn sono riuscito a far nulla....
come posso risolvere questa cosa?
Codice: Seleziona tutto
new infoBoxHeading($info_box_contents, false, false);
Codice: Seleziona tutto
class infoBox extends tableBox {
function infoBox($contents) {
$info_box_contents = array();
$info_box_contents[] = array('text' => $this->infoBoxContents($contents));
$this->table_cellpadding = '1';
$this->table_parameters = 'class="infoBox"';
$this->tableBox($info_box_contents, true);
}
function infoBoxContents($contents) {
$this->table_cellpadding = '3';
$this->table_parameters = 'class="infoBoxContents"';
$info_box_contents = array();
$info_box_contents[] = array(array('text' => tep_draw_separator('pixel_trans.gif', '100%', '1')));
for ($i=0, $n=sizeof($contents); $i<$n; $i++) {
$info_box_contents[] = array(array('align' => (isset($contents[$i]['align']) ? $contents[$i]['align'] : ''),
'form' => (isset($contents[$i]['form']) ? $contents[$i]['form'] : ''),
'params' => 'class="boxText"',
'text' => (isset($contents[$i]['text']) ? $contents[$i]['text'] : '')));
}
$info_box_contents[] = array(array('text' => tep_draw_separator('pixel_trans.gif', '100%', '1')));
return $this->tableBox($info_box_contents);
}
}
Codice: Seleziona tutto
class infoBoxx extends tableBox {
function infoBoxx($contents) {
$info_boxx_contents = array();
$info_boxx_contents[] = array('text' => $this->infoBoxxContents($contents));
$this->table_cellpadding = '1';
$this->table_parameters = 'class="infoBox"';
$this->tableBox($info_boxx_contents, true);
}
function infoBoxxContents($contents) {
$this->table_cellpadding = '3';
$this->table_parameters = 'class="infoBoxxContents"';
$info_boxx_contents = array();
$info_boxx_contents[] = array(array('text' => tep_draw_separator('pixel_trans.gif', '100%', '1')));
for ($i=0, $n=sizeof($contents); $i<$n; $i++) {
$info_box_contents[] = array(array('align' => (isset($contents[$i]['align']) ? $contents[$i]['align'] : ''),
'form' => (isset($contents[$i]['form']) ? $contents[$i]['form'] : ''),
'params' => 'class="boxText"',
'text' => (isset($contents[$i]['text']) ? $contents[$i]['text'] : '')));
}
$info_boxx_contents[] = array(array('text' => tep_draw_separator('pixel_trans.gif', '100%', '1')));
return $this->tableBox($info_boxx_contents);
}
}
Controlla in questo file lo trovi nelle ultime 20 righe.berte ha scritto:la contrib è loginbox v2.2c
Codice: Seleziona tutto
<?php /* $Id: information.php,v 1.5 2002/01/11 22:04:06 dgw_ Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2001 osCommerce Released under the GNU General Public License */ ?> <!-- information //--> <tr> <td> <?php require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_LOGIN_WELCOME); if (tep_session_is_registered('customer_id')) { $info_box_contents = array(); $info_box_contents[] = array('align' => 'left', 'text' => BOX_HEADING_MEMBERLOGGED_IN ); $db=DB_DATABASE; $select="select customers_firstname from customers where customers_id="$customer_id""; $result=mysql_db_query($db,$select); $res=mysql_fetch_object($result); $in_out_action = "<center>"; $in_out_action.= LOGIN_BOX_WELCOME_TEXT; $in_out_action.= "<br>$res->customers_firstname <br><br>"; $in_out_action.='<a href="'.tep_href_link(FILENAME_ACCOUNT, '', 'SSL').'">'; $in_out_action.= LOGIN_BOX_WELCOME_MYACCOUNT; $in_out_action.="</a><br>"; $in_out_action.='<a href="'.tep_href_link(FILENAME_LOGOFF, '', 'NONSSL').'">'; $in_out_action.= LOGIN_BOX_WELCOME_LOGOUT; $in_out_action.="</a></center>"; } else { $info_box_contents = array(); $info_box_contents[] = array('align' => 'left', 'text' => BOX_HEADING_MEMBERLOGIN ); $in_out_action = ' <form name="login" action="login.php?action=process" method="post"> <center> <table border="0" cellpadding="0" cellspacing="0" class="smallText" > <tr > <td width="100%" height="16" class="smallText"> <p align="center">'; $in_out_action.= LOGIN_BOX_WELCOME_EMAILADDRESS; $in_out_action.= '</td> </tr> <tr> <td width="100%" height="16" class="smallText"> <p align="center"> <input maxLength="96" name="email_address"size="12"> </td> </tr> <tr> <td width="100%" height="16" class="smallText"> <p align="center">'; $in_out_action.=LOGIN_BOX_WELCOME_PASSWORD; $in_out_action.='</font></td> </tr> <tr> <td width="100%" height="19"> <p align="center"><b> <font size="1" class="smallText"> <input type="password" maxLength="40" value name="password" size="12"></b> </td> </tr> <tr> <td width="100%" height="1" class="smallText"> <p align="center">'; $in_out_action.='<br><input type="submit" value="'; $in_out_action.=LOGIN_BOX_WELCOME_LOGIN; $in_out_action.='" name="Submit">'; //Forgotten Password $in_out_action.= '<br>'; $in_out_action.='<a class="smallText" href="'; $in_out_action.=tep_href_link(FILENAME_PASSWORD_FORGOTTEN); $in_out_action.='">'; $in_out_action.= LOGIN_BOX_PASSWORD_FORGOTTEN; $in_out_action.='</a> </td> </tr> <tr> <td width="100%" height="1" class="smallText"> <p align="center">'; //create account $in_out_action.= '<br>'; $in_out_action.='<a class="smallText" href="'; $in_out_action.=tep_href_link(FILENAME_CREATE_ACCOUNT); $in_out_action.='">'; $in_out_action.= LOGIN_BOX_CREATE_ACCOUNT; $in_out_action.='</a> </td> </tr> </table> </form> '; } new infoBoxHeading($info_box_contents, false, false); $info_box_contents = array(); $info_box_contents[] = array('align' => 'left', 'params' => 'class="smallText" valign="top"', 'text' => $in_out_action ); new infoBox($info_box_contents); ?></td></tr> <!-- information_eof //-->
Codice: Seleziona tutto
class infoBoxx extends tableBox {
function infoBoxx($contents) {
$info_boxx_contents = array();
$info_boxx_contents[] = array('text' => $this->infoBoxxContents($contents));
$this->table_cellpadding = '1';
$this->table_parameters = 'class="infoBox"';
$this->tableBox($info_boxx_contents, true);
}
function infoBoxxContents($contents) {
$this->table_cellpadding = '3';
$this->table_parameters = 'class="infoBoxxContents"';
$info_boxx_contents = array();
$info_boxx_contents[] = array(array('text' => tep_draw_separator('pixel_trans.gif', '100%', '1')));
for ($i=0, $n=sizeof($contents); $i<$n; $i++) {
$info_box_contents[] = array(array('align' => (isset($contents[$i]['align']) ? $contents[$i]['align'] : ''),
'form' => (isset($contents[$i]['form']) ? $contents[$i]['form'] : ''),
'params' => 'class="boxText"',
'text' => (isset($contents[$i]['text']) ? $contents[$i]['text'] : '')));
}
$info_boxx_contents[] = array(array('text' => tep_draw_separator('pixel_trans.gif', '100%', '1')));
return $this->tableBox($info_boxx_contents);
}
}
Codice: Seleziona tutto
.infoBoxx {
background: #ffffff;
}