Exemple #1
0
    function UserView($option, $rowExUser, $u_name, $u_username, $u_email)
    {
        ?>
  <table cellpadding="5" cellspacing="0" border="0" width="100%">
    <tr>
      <td colspan="2" width="100%" class="componentheading"><?php 
        echo _UEXT_DETAILSVIEW;
        ?>
</td>
    </tr>
    <tr>
      <td width="30%" align="right"><?php 
        echo _REGISTER_NAME;
        ?>
</td>
      <td width="70%"><?php 
        echo $u_name;
        ?>
</td>
    </tr>
    <tr>
      <td align="right"><?php 
        echo _REGISTER_UNAME;
        ?>
</td>
      <td><?php 
        echo $u_username;
        ?>
</td>
    <tr>
      <td align="right"><?php 
        echo _REGISTER_EMAIL;
        ?>
</td>
      <td><?php 
        echo $u_email;
        ?>
 </td>
    </tr>
    <tr>
      <td colspan="2">&nbsp;</td>
    </tr>

    <?php 
        //Extended User details view
        global $database;
        include_once "administrator/components/com_user_extended/user_extended.class.php";
        $rowExtended = new mosUser_Extended_Config($database);
        $rowExtended->load(1);
        ?>
    <?php 
        if ($rowExtended->user1_show == "1") {
            ?>
    <tr>
       <td width="20%" valign="top" align="right"><?php 
            echo $rowExtended->user1_name;
            ?>
 </td>
       <td><?php 
            echo $rowExUser->user1;
            ?>
</td>
    </tr>
    <?php 
        }
        if ($rowExtended->user2_show == "1") {
            ?>
    <tr>
       <td width="20%" valign="top" align="right"><?php 
            echo $rowExtended->user2_name;
            ?>
</td>
       <td><?php 
            echo $rowExUser->user2;
            ?>
</td>
    </tr>
    <?php 
        }
        if ($rowExtended->user3_show == "1") {
            ?>
    <tr>
       <td width="20%" valign="top" align="right"><?php 
            echo $rowExtended->user3_name;
            ?>
</td>
       <td><?php 
            echo $rowExUser->user3;
            ?>
</td>
    </tr>
    <?php 
        }
        ?>
    <?php 
        if ($rowExtended->user4_show == "1") {
            ?>
    <tr>
       <td width="20%" valign="top" align="right"><?php 
            echo $rowExtended->user4_name;
            ?>
 </td>
       <td><?php 
            echo $rowExUser->user4;
            ?>
</td>
    </tr>
    <?php 
        }
        ?>
    <?php 
        if ($rowExtended->user5_show == "1") {
            ?>
    <tr>
       <td width="20%" valign="top" align="right"><?php 
            echo $rowExtended->user5_name;
            ?>
 </td>
       <td><?php 
            echo $rowExUser->user5;
            ?>
</td>
    </tr>
    <?php 
        }
        ?>
    <?php 
        if ($rowExtended->user6_show == "1") {
            ?>
    <tr>
       <td width="20%" valign="top" align="right"><?php 
            echo $rowExtended->user6_name;
            ?>
 </td>
       <td><?php 
            echo $rowExUser->user6;
            ?>
</td>
    </tr>
    <?php 
        }
        ?>
    <?php 
        if ($rowExtended->user7_show == "1") {
            ?>
    <tr>
       <td width="20%" valign="top" align="right"><?php 
            echo $rowExtended->user7_name;
            ?>
 </td>
       <td><?php 
            echo $rowExUser->user7;
            ?>
</td>
    </tr>
    <?php 
        }
        ?>
    <?php 
        if ($rowExtended->user8_show == "1") {
            ?>
    <tr>
       <td width="20%" valign="top" align="right"><?php 
            echo $rowExtended->user8_name;
            ?>
 </td>
       <td><?php 
            echo $rowExUser->user8;
            ?>
</td>
    </tr>
    <?php 
        }
        ?>
    <?php 
        if ($rowExtended->user9_show == "1") {
            ?>
    <tr>
       <td width="20%" valign="top" align="right"><?php 
            echo $rowExtended->user9_name;
            ?>
 </td>
       <td><?php 
            echo $rowExUser->user9;
            ?>
</td>
    </tr>
    <?php 
        }
        ?>
    <?php 
        if ($rowExtended->user10_show == "1") {
            ?>
    <tr>
       <td width="20%" valign="top" align="right"><?php 
            echo $rowExtended->user10_name;
            ?>
 </td>
       <td><?php 
            echo $rowExUser->user10;
            ?>
</td>
    </tr>
    <?php 
        }
        ?>

    <?php 
        if ($rowExtended->user11_show == "1") {
            ?>
    <tr>
       <td width="20%" valign="top" align="right"><?php 
            echo $rowExtended->user11_name;
            ?>
 </td>
       <td><?php 
            echo $rowExUser->user11;
            ?>
</td>
    </tr>
    <?php 
        }
        ?>
    <?php 
        if ($rowExtended->user12_show == "1") {
            ?>
    <tr>
       <td width="20%" valign="top" align="right"><?php 
            echo $rowExtended->user12_name;
            ?>
 </td>
       <td><?php 
            echo $rowExUser->user12;
            ?>
</td>
    </tr>
    <?php 
        }
        ?>
    <?php 
        if ($rowExtended->user13_show == "1") {
            ?>
    <tr>
       <td width="20%" valign="top" align="right"><?php 
            echo $rowExtended->user13_name;
            ?>
 </td>
       <td><?php 
            echo $rowExUser->user13;
            ?>
</td>
    </tr>
    <?php 
        }
        ?>
    <?php 
        if ($rowExtended->user14_show == "1") {
            ?>
    <tr>
       <td width="20%" valign="top" align="right"><?php 
            echo $rowExtended->user14_name;
            ?>
 </td>
       <td><?php 
            echo $rowExUser->user14;
            ?>
</td>
    </tr>
    <?php 
        }
        ?>
    <?php 
        if ($rowExtended->user15_show == "1") {
            ?>
    <tr>
       <td width="20%" valign="top" align="right"><?php 
            echo $rowExtended->user15_name;
            ?>
 </td>
       <td><?php 
            echo $rowExUser->user15;
            ?>
</td>
    </tr>
    <?php 
        }
        ?>
  </table>
  <input type="hidden" name="id" value="<?php 
        echo $row->id;
        ?>
" />
  <input type="hidden" name="option" value="<?php 
        echo $option;
        ?>
">
  <?php 
    }
Exemple #2
0
function saveConfig($option, $database)
{
    global $database, $my, $mainframe;
    $row = new mosUser_Extended_Config($database);
    if (!$row->bind($_POST)) {
        echo "<script> alert('" . $row->getError() . "'); window.history.go(-1); </script>\n";
        exit;
    }
    if (!$row->check()) {
        echo "<script> alert('" . $row->getError() . "'); window.history.go(-1); </script>\n";
        exit;
    }
    if (!$row->store()) {
        echo "<script> alert('" . $row->getError() . "'); window.history.go(-1); </script>\n";
        exit;
    }
    mosRedirect("index2.php?option=com_user_extended", "Config Saved!");
}