<?php
/* Copyright (C) 2004 - 2005 Carl Peterson (hide@address.com)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
/* CREATE REQUESTED ACCOUNTS, ADD TO DB AND MAKE PDF
* File written by Carl H. Peterson 2004, 2005
* Filename is the only thing left from dalhabe admin
*/
/*
// First we are going to include the file that creates an
// array of usernames and passwords. We will than loop
// through the array, add them to the DB and echo them
// onto the screen. We will then loop through the array
// again to kick out a nice PDF for printing.
*
*/
if (!isset($oreon))
exit();
if(isset($error)){ echo $error; unset($error); return;} //just to be sure
$phpmyprepaid=$oreon->phpmyprepaid;
$mintime=$phpmyprepaid['minimun_time_sold'];
$maxtime=$phpmyprepaid['maximun_time_sold'];
$crypt=$phpmyprepaid['crypt'];
$minmoctets=$phpmyprepaid['minimun_moctet_sold'];
$maxmoctets=$phpmyprepaid['maximun_moctet_sold'];
$prefix=$phpmyprepaid['uname_prefix'];
$suffix=$phpmyprepaid['uname_suffix'];
$name_lgth=$phpmyprepaid['default_name_length'];
$use_caps=$phpmyprepaid['use_caps'];
$use_numeric=$phpmyprepaid['use_numeric'];
$passwd_lgth=$phpmyprepaid['default_passwd_length'];
$max=$phpmyprepaid['maximun_cards'];
$usedomainname=$phpmyprepaid['use_domain_name'];
$locationNasIdentifier=$phpmyprepaid['location_nas_identifier'];
$numMonthExpireAccount=$phpmyprepaid['max_month_old'];
$gatewayType=$phpmyprepaid['gateway_type'];
$default_timeToFinish=$phpmyprepaid['default_timetofinish'];
$simUse=$phpmyprepaid['default_simultanous_use'];
$replyMessageValue=$phpmyprepaid['reply_message'];
$idleTimeoutValue=$phpmyprepaid['default_idle_timeout'];
$acctIntervalValue=$phpmyprepaid['default_accounting_interval'];
$logoffUrlValue=$phpmyprepaid['logoff_url'];
$redirectionUrlValue=$phpmyprepaid['redirection_url'];
$uamAllowedValue=$phpmyprepaid['uam_allowed'];
$macAllowedValue= $phpmyprepaid['mac_allowed'];
$octet_type= $phpmyprepaid['octet_type'];
$use_pid= $phpmyprepaid['use_pid'];
$use_pid_passwd= $phpmyprepaid['use_pid_passwd'];
if (isset($_POST['TimeCount'])) $timeCountRes= $_POST['TimeCount'];
if (isset($_POST['OctetCount'])) $octetCountRes= $_POST['OctetCount'];
include('include/account/process.php');
if (!isset($_SESSION['error'])) {
include('include/account/create_NF_ID.php'); // <--- This creates the array Userpass
// with username as key and pass as value
//////////////////////////////////////////////////////////////////////////
// DATABASE INSERTION GOES HERE FOR NOW. //
// Later I may make an array and then //
// insert it all at once. //
// (C) Carl H. Peterson 2004 //
// (C) phpMyAdmin project 2004 //
//////////////////////////////////////////////////////////////////////////
include('include/account/DBinsert.php');
/////////////////////////////////////////////////////////////////////////
// DUMP IT INTO A TABLE IN CASE PDFS DON'T WORK //
/////////////////////////////////////////////////////////////////////////
//if(isset($_POST['AnzahlSeiten'])) { include('dispTable.php'); }
include('include/account/dispTable.php');
//////////////////////////////////////////////////////////////////
// Create a csv file //
//////////////////////////////////////////////////////////////////
//include('include/account/genCVS.php');
//////////////////////////////////////////////////////////////////////////
// CARD PRINTING USING FPDF AND A LITTLE LUCK //
// This uses PDF_Label.php Credits are in that file somewhere //
// but it was released as Freeware. I will atribute it and //
// clean this up later. Don't know what the AVERY names are //
// but I will try some of them and leave in the ones that //
// seem like they would be good to use for card printing //
// //
//////////////////////////////////////////////////////////////////////////
//if(isset($_POST['AnzahlSeiten'])) { include('genPDF.php'); }
//if(isset($qwprint)) { include('genPPC.php');}
//include('include/account/genVoucher.php');
//include('include/account/genPDF.php');
if (isset($_POST['CR_subscription_expiration'])) unset($_POST['CR_subscription_expiration']);
if (isset($_POST['CR_subscription_timed'])) unset($_POST['CR_subscription_timed']);
if (isset($_POST['CR_subscription_octets'])) unset($_POST['CR_subscription_octets']);
if (isset($_POST['subscription_expiration'])) unset($_POST['CR_subscription_expiration']);
if (isset($_POST['subscription_timed'])) unset($_POST['CR_subscription_timed']);
if (isset($_POST['subscription_octets'])) unset($_POST['CR_subscription_octets']);
if (isset($_POST['CR_Expiration'])) unset($_POST['CR_Expiration']);
if (isset($_POST['CR_Timed'])) unset($_POST['CR_Timed']);
if (isset($_POST['timed'])) unset($_POST['CR_Timed']);
if (isset($_POST['octets'])) unset($_POST['CR_Timed']);
if (isset($_POST['expiration'])) unset($_POST['CR_Timed']);
if (isset($_POST['CR_Octets'])) unset($_POST['CR_Octets']);
if (isset($_POST['CR_subscription_mac'])) unset($_POST['CR_subscription_mac']);
unset($buttonID);
}else echo $error;
// ----------> END OF CARD PRINTING
//-----------> END OF THIS FILE
?>