mcramer
2012-11-27 7990f8881b085279269d35cf9dd2787b88ae1c08
interface/web/admin/login_as.php
@@ -45,10 +45,10 @@
}
if(isset($_GET['id'])) {
   $userId = intval($_GET['id']);
   $userId = $app->functions->intval($_GET['id']);
   $backlink = 'admin/users_list.php';
} else {
   $client_id = intval($_GET['cid']);
   $client_id = $app->functions->intval($_GET['cid']);
   $tmp_client = $app->db->queryOneRecord("SELECT username FROM client WHERE client_id = $client_id");
   $tmp_sys_user = $app->db->queryOneRecord("SELECT userid FROM sys_user WHERE username = '".$app->db->quote($tmp_client['username'])."'");
   $userId = $tmp_sys_user['userid'];
@@ -65,6 +65,7 @@
/*
 * Now generate the login-Form
 * TODO: move the login_as form to a template file -> themeability
 */
echo '
   <br /> <br />   <br /> <br />
@@ -77,8 +78,8 @@
   <input type="hidden" name="s_mod" value="login" />
   <input type="hidden" name="s_pg" value="index" />
    <div class="wf_actions buttons">
      <button class="positive iconstxt icoPositive" type="button" value="Yes, login as Client" onClick="submitLoginForm(' . "'pageForm'" . ');"><span>Yes, login as Client</span></button>
      <button class="negative iconstxt icoNegative" type="button" value="No, back to list" onClick="loadContent('. "'$backlink'" . ');"><span>No, back to list</span></button>
      <button class="positive iconstxt icoPositive" type="button" value="Yes, login as Client" onclick="submitLoginForm(' . "'pageForm'" . ');"><span>Yes, login as Client</span></button>
      <button class="negative iconstxt icoNegative" type="button" value="No, back to list" onclick="loadContent('. "'$backlink'" . ');"><span>No, back to list</span></button>
    </div>
';
?>