Esempio n. 1
0
         $sort_array['Status'] = 'Status';
         $sortbaseurl = "{$base_url}&mode=users&user_mode=show_users";
         while (list($key, $val) = each($sort_array)) {
             $newsortway = get_sortway($sortfield, $val, $sortway);
             $url = "<a href='{$sortbaseurl}&sortway={$newsortway}&sortfield={$val}'>" . ereg_replace('_', ' ', $key) . "</a>";
             if ($sortfield == $val) {
                 $url .= "&nbsp;<img border=0 alt='{$sortway}' src=images/{$sortway}.png>";
             }
             $smarty->assign($key, $url);
         }
         $counter = 0;
         while ($row = mysql_fetch_array($result)) {
             $out_array[$counter]['name'] = $row['First_Name'] . ' ' . $row['Last_Name'];
             $out_array[$counter]['email'] = $row['Email'];
             $out_array[$counter]['account_type'] = $row['Account_Type'];
             $out_array[$counter]['group_owner_name'] = get_groupowner_name($row['gid']);
             $out_array[$counter]['status'] = $row['Status'];
             $out_array[$counter]['edit_url'] = "{$base_url}&mode=users&user_mode=edit_account&cid=" . $row['cid'];
             if ($row['cid'] != $user_info['cid']) {
                 $out_array[$counter]['delete_url'] = "{$base_url}&mode=users&user_mode=delete&cid=" . $row['cid'];
             }
             $counter++;
         }
         $smarty->assign('out_array', $out_array);
         $smarty->display('header.tpl');
         $smarty->display('show_users.tpl');
         $smarty->display('footer.tpl');
         exit;
     }
 } else {
     if ($_REQUEST['user_mode'] == 'delete') {
Esempio n. 2
0
                                     $smarty->display('header.tpl');
                                     require 'src/change_owner.php';
                                     $smarty->display('footer.tpl');
                                     exit;
                                 }
                                 $change_group = 1;
                             }
                             $q = "update domains set owner_id='{$owner_id}'";
                             if ($change_group == 1) {
                                 $q .= ", group_owner_id = '{$group_owner_id}'";
                             }
                             $q .= " where domain_id = '" . $_REQUEST['domain_id'] . "'";
                             $pdo->query($q) or die(print_r($pdo->errorInfo()));
                             $log_entry = "changed owner to " . get_owner_name($owner_id);
                             if ($change_group == 1) {
                                 $log_entry .= " and changed group_owner to " . get_groupowner_name($group_owner_id);
                             }
                             dns_log($_REQUEST['domain_id'], $log_entry);
                             set_msg("Ownership changed successfully");
                             header("Location: {$base_url}&mode=domains");
                             exit;
                         }
                     }
                 }
             }
         } else {
             if ($_REQUEST['domain_mode'] == 'domain_prefs') {
             }
         }
     }
 }