This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Welcome, Guest
You have to register before you can post on our site.

Username/Email:
  

Password
  





Search Forums

(Advanced Search)

Forum Statistics
» Members: 19 ,833
» Latest member: ibnalbahruae
» Forum threads: 3 ,739
» Forum posts: 22 ,790

Full Statistics

Online Users
There are currently 86 online users.
» 0 Member(s) | 82 Guest(s)
Applebot, Bing, Google, UptimeRobot

Latest Threads
security upgrade
Forum: Upgrade Support v2.x.x
Last Post: andykimpe
05-28-2023, 08:35 PM
» Replies: 0
» Views: 23
Install Sentora automatic...
Forum: General Support Forum v2.x.x
Last Post: TGates
05-26-2023, 02:46 AM
» Replies: 4
» Views: 77
Nigel's Repo
Forum: 3rd Party Module Support v1.0.x
Last Post: TGates
05-24-2023, 04:09 AM
» Replies: 6
» Views: 1 ,639
issue binding to 1 ipaddr...
Forum: General Support Forum v2.x.x
Last Post: TGates
05-03-2023, 06:44 AM
» Replies: 1
» Views: 95
Need to update from beta
Forum: Upgrade Support v2.x.x
Last Post: FernandoGarcia
04-30-2023, 05:46 AM
» Replies: 9
» Views: 953
Sentastico Script Install...
Forum: 3rd Party Module Support v2.x.x
Last Post: TGates
04-21-2023, 09:34 AM
» Replies: 4
» Views: 576
SenAds Advertisement Modu...
Forum: 3rd Party Module Support v2.x.x
Last Post: TGates
04-17-2023, 05:25 AM
» Replies: 0
» Views: 88
Sentastico Script Install...
Forum: Active v2.x.x Modules
Last Post: TGates
04-17-2023, 04:06 AM
» Replies: 0
» Views: 82
Absolute path to images
Forum: General Discussions (Non-Support Related)
Last Post: TGates
04-16-2023, 09:31 AM
» Replies: 1
» Views: 157
Hos Insert DMARC, SPF, et...
Forum: General Support Forum v2.x.x
Last Post: TGates
04-09-2023, 12:51 AM
» Replies: 1
» Views: 185

 
Drupal hit & run
Posted by: Me.B - 11-01-2014, 08:54 AM - Forum: General Discussions (Non-Support Related) - No Replies

http://www.bbc.com/news/technology-29846539

Bots are taking over drupal sites not patching according to some estimates it's 12 millions websites that could be compromised! Feels a bit exaggerated but still it's a good blitz.

Drupal CVE:

https://www.drupal.org/PSA-2014-003

Print this item

Free Forums Service
Posted by: Chris L - 10-28-2014, 01:35 PM - Forum: General Discussions (Non-Support Related) - Replies (2)

hi all

ive a spare server im thinking on setting up and thinking of providing a Free Forums service for the communities websites it doesnt have to be Sentora related forums you can use it for your own websites, discussions etc the service will be fully automated so no waiting for activation etc.

Forum software will be based on MyBB and will be kept updated and the server will be CentOS based

Server i will be using to make sure resources are fine for the task is

Forums will be backed up nightly to a secure server

If anyones interested please let me know.

thanks.

Print this item

Logged in and logged out get different themes on forum
Posted by: Ron-e - 10-26-2014, 09:58 PM - Forum: General Discussions (Non-Support Related) - Replies (9)

Did you know that if you log out you get another theme then when you are logged in?

Print this item

Thank you
Posted by: Nextus - 10-26-2014, 02:14 PM - Forum: General Discussions (Non-Support Related) - Replies (2)

I know ive been asking alot of questions lately. but thank you. Seriously.

we now have our datacenter completely up and running with sentora/zpanel (rest will be moved to sentora soon)

we have 3 full racks of dell poweredge servers. 4 nas(60tb total), 22 server blades(18 running linux & 4 running ms2012), 2 dell sonicwall firewalls.

you guys have been amazing so far. i would love to see perl/cgi working soon. the options are there but they dont work.

i look forward to sentora in the future. i see good things with this.

Print this item

Guide to customer tech support
Posted by: TGates - 10-23-2014, 08:30 AM - Forum: General Discussions (Non-Support Related) - No Replies

Print this item

Just for kicks and giggles!
Posted by: akross6966 - 10-22-2014, 08:35 PM - Forum: General Discussions (Non-Support Related) - Replies (3)

I thought it would be fun to see what else i could get Sentora to run on.  So, i fired up the latest Mint 17 distro (Cinnamon Desktop - but should work with any) and worked with the installer.  Here is a screenshot of the finished product. Let me know what you think.  Smile

[Image: SentoraMintTest.png]

Print this item

selenium IDE
Posted by: Me.B - 10-22-2014, 08:07 PM - Forum: General Discussions (Non-Support Related) - No Replies

http://www.seleniumhq.org/projects/

Very intersting tool offering a lot of ways to test web interfaces:

With http://www.seleniumhq.org/projects/ide/ Selenium IDE you can record a navigation script so you can reproduce it & replay the recorded session.

Very important for testing web apps using firefox & trying to catch up bugs following some process.

M B

Print this item

Vmware cloning machine eth0 unable to start
Posted by: Me.B - 10-20-2014, 03:29 AM - Forum: General Discussions (Non-Support Related) - No Replies

ISSUE on centos 6.xx/7.xx

Main issue when you clone a VM under Vmware Workstation or ESXI is network being lost here. 

So the problem lies in Vmware adding another network card with a different UID/MAC that will replace the old eth0 and the kernel would detect it as eth1 while your old setup would keep the config in:

/etc/sysconfig/network-scripts/ifcfg-eth0

You could rename it to ifcfg-eth1 or fix the network detection in :

 /etc/udev/rules.d/70-persistent-net.rules

Edit the file and remove the line with eth0 then replace in the second network card eth1 with etho0. Save and reboot server, you should get network back.

Don't forget to fire any mac/uid you had in "ifcfg-eth0" config

This would apply to Virtual box too.

M B

Print this item

Banking System Help Needed
Posted by: zHostingSolutions - 10-19-2014, 03:10 AM - Forum: General Discussions (Non-Support Related) - Replies (5)

Hi.


I need some help with the following files. I've worked on them since the last time I've posted about this subject through zPanel.

netbanking.sql - NO CHANGES NEEDED:

Code:
-- phpMyAdmin SQL Dump
-- version 3.4.5
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Feb 19, 2013 at 02:01 PM
-- Server version: 5.5.16
-- PHP Version: 5.3.8
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
--
-- Database: `netbanking`
--
-- --------------------------------------------------------
--
-- Table structure for table `accountmaster`
--
CREATE TABLE IF NOT EXISTS `accountmaster` (
  `accounttype` varchar(25) NOT NULL,
  `prefix` varchar(11) NOT NULL,
  `minbalance` double(12,2) NOT NULL,
  `interest` double(10,2) NOT NULL,
  PRIMARY KEY (`accounttype`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `accountmaster`
--
INSERT INTO `accountmaster` (`accounttype`, `prefix`, `minbalance`, `interest`) VALUES
('current', 'fd', 6000.00, 600.00),
('dfd', 'gdf', 45.00, 7546.00),
('salary account', 'SAL', 0.00, 10.00),
('saving', 'sb', 4000.00, 500.00);
-- --------------------------------------------------------
--
-- Table structure for table `accounts`
--
CREATE TABLE IF NOT EXISTS `accounts` (
  `accno` varchar(25) NOT NULL,
  `customerid` int(10) NOT NULL,
  `accstatus` varchar(25) NOT NULL,
  `primaryacc` varchar(10) NOT NULL,
  `accopendate` date NOT NULL,
  `accounttype` varchar(25) NOT NULL,
  `accountbalance` double(10,2) NOT NULL,
  `unclearbalance` double(10,2) NOT NULL,
  `accuredinterest` double(10,2) NOT NULL,
  PRIMARY KEY (`accno`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `accounts`
--
INSERT INTO `accounts` (`accno`, `customerid`, `accstatus`, `primaryacc`, `accopendate`, `accounttype`, `accountbalance`, `unclearbalance`, `accuredinterest`) VALUES
('4666', 98683, 'active', '40000', '2013-02-11', 'sv', 100000.00, 100.00, 100.00);
-- --------------------------------------------------------
--
-- Table structure for table `branch`
--
CREATE TABLE IF NOT EXISTS `branch` (
  `ifsccode` varchar(25) NOT NULL,
  `branchname` varchar(50) NOT NULL,
  `city` varchar(25) NOT NULL,
  `branchaddress` text NOT NULL,
  `state` varchar(25) NOT NULL,
  `country` varchar(25) NOT NULL,
  PRIMARY KEY (`ifsccode`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `branch`
--
INSERT INTO `branch` (`ifsccode`, `branchname`, `city`, `branchaddress`, `state`, `country`) VALUES
('5249898', 'Mangalore', 'gfhdh', 'hdjjj', 'PAKISTAN', 'MAHARASTRA'),
('KARB0000404', 'karkala', 'karkala', 'NEAR BUS STAND,KARLA COMPLEX,1ST FLOOR,PB 19,KARKALA 574104,UDUPI DIST', 'KARNATAKA', 'india'),
('tyg', 'yfy', 'fy', 'yfg', 'PAKISTAN', 'MAHARASTRA');
-- --------------------------------------------------------
--
-- Table structure for table `customers`
--
CREATE TABLE IF NOT EXISTS `customers` (
  `customerid` int(10) NOT NULL AUTO_INCREMENT,
  `ifsccode` varchar(25) NOT NULL,
  `firstname` varchar(25) NOT NULL,
  `lastname` varchar(25) NOT NULL,
  `loginid` varchar(25) NOT NULL,
  `accpassword` varchar(50) NOT NULL,
  `transpasword` varchar(50) NOT NULL,
  `accstatus` varchar(25) NOT NULL,
  `city` varchar(25) NOT NULL,
  `state` varchar(25) NOT NULL,
  `country` varchar(25) NOT NULL,
  `accopendate` date NOT NULL,
  `lastlogin` datetime NOT NULL,
  PRIMARY KEY (`customerid`)
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=98684 ;
--
-- Dumping data for table `customers`
--
INSERT INTO `customers` (`customerid`, `ifsccode`, `firstname`, `lastname`, `loginid`, `accpassword`, `transpasword`, `accstatus`, `city`, `state`, `country`, `accopendate`, `lastlogin`) VALUES
(98680, 'KARB0000404', 'sadf', 'werwe', '23432', 'fgdfg', 'werwe', 'ACTIVE', '23423', 'KARNATAKA', 'INDIA', '2013-02-02', '0000-00-00 00:00:00'),
(98682, '5249898', 'Raj', 'kiran', '123456', '987654', '123456', 'ACTIVE', 'mangaloree', 'KARNATAKA', 'INDIA', '2013-02-02', '0000-00-00 00:00:00'),
(98683, '5249898', 'john', 'mark', 'cust', 'cust', 'cust', 'ACTIVE', 'mangalore', 'KARNATAKA', 'INDIA', '2013-02-09', '2013-02-16 05:25:20');
-- --------------------------------------------------------
--
-- Table structure for table `employees`
--
CREATE TABLE IF NOT EXISTS `employees` (
  `empid` int(10) NOT NULL AUTO_INCREMENT,
  `employee_name` varchar(25) NOT NULL,
  `loginid` varchar(25) NOT NULL,
  `password` varchar(25) NOT NULL,
  `emailid` varchar(30) NOT NULL,
  `contactno` varchar(30) NOT NULL,
  `createdat` date NOT NULL,
  `last_login` datetime NOT NULL,
  PRIMARY KEY (`empid`)
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=313800 ;
--
-- Dumping data for table `employees`
--
INSERT INTO `employees` (`empid`, `employee_name`, `loginid`, `password`, `emailid`, `contactno`, `createdat`, `last_login`) VALUES
(313786, 'soudhabanu', '445545', '125487', 'soudha_ban@52yahoo.com', '9535543313', '2012-12-15', '2012-12-03 11:27:00'),
(313787, 'mahesh', 'mahesh', 'qwert', 'mahesh@gmail.com', '98478872783', '0000-00-00', '0000-00-00 00:00:00'),
(313788, 'jyothi', '3535355', '3636', 'jyothi@yahoo.com', '95425422424', '2013-01-02', '0000-00-00 00:00:00'),
(313791, 'admin', 'admin', 'admin', 'admin', 'admin', '2013-01-12', '2013-01-12 00:00:00'),
(313798, 'raj', 'rajkiran', '123456', 'abc@gmail.com', '9874563210', '2013-02-02', '0000-00-00 00:00:00'),
(313799, 'peter king', 'emp', 'emp', 'emp@gmail.com', '987456321', '2013-02-09', '0000-00-00 00:00:00');
-- --------------------------------------------------------
--
-- Table structure for table `loan`
--
CREATE TABLE IF NOT EXISTS `loan` (
  `loanid` int(10) NOT NULL AUTO_INCREMENT,
  `loantype` varchar(25) NOT NULL,
  `loanamt` varchar(25) NOT NULL,
  `period` varchar(25) NOT NULL,
  `interest` float(10,2) NOT NULL,
  `startdate` date NOT NULL,
  PRIMARY KEY (`loanid`)
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=2147483647 ;
--
-- Dumping data for table `loan`
--
INSERT INTO `loan` (`loanid`, `loantype`, `loanamt`, `period`, `interest`, `startdate`) VALUES
(2147483647, 'homeloan', '300000', 'monthly', 63.09, '2012-12-02');
-- --------------------------------------------------------
--
-- Table structure for table `loanpayment`
--
CREATE TABLE IF NOT EXISTS `loanpayment` (
  `paymentid` int(10) NOT NULL AUTO_INCREMENT,
  `date` date NOT NULL,
  `paidamt` float(10,2) NOT NULL,
  `principleamt` float(10,2) NOT NULL,
  `interestamt` float(10,2) NOT NULL,
  `balance` float(10,2) NOT NULL,
  PRIMARY KEY (`paymentid`)
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=2147483647 ;
--
-- Dumping data for table `loanpayment`
--
INSERT INTO `loanpayment` (`paymentid`, `date`, `paidamt`, `principleamt`, `interestamt`, `balance`) VALUES
(2147483647, '2012-01-03', 50000.00, 25000.00, 2500.50, 250000.00);
-- --------------------------------------------------------
--
-- Table structure for table `loantype`
--
CREATE TABLE IF NOT EXISTS `loantype` (
  `loantype` varchar(25) NOT NULL,
  `prefix` varchar(25) NOT NULL,
  `maximumamt` float(10,2) NOT NULL,
  `minimumamt` float(10,2) NOT NULL,
  `interest` float(10,2) NOT NULL,
  `status` varchar(25) NOT NULL,
  UNIQUE KEY `loantype` (`loantype`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `loantype`
--
INSERT INTO `loantype` (`loantype`, `prefix`, `maximumamt`, `minimumamt`, `interest`, `status`) VALUES
('current', 'sb', 70000.00, 50000.00, 3000.00, 'active'),
('homeloan', 'hl', 1000000.00, 50000.00, 65.09, 'active'),
('sb', 'fd', 7000.00, 5000.00, 400.00, 'active');
-- --------------------------------------------------------
--
-- Table structure for table `mail`
--
CREATE TABLE IF NOT EXISTS `mail` (
  `mailid` int(10) NOT NULL AUTO_INCREMENT,
  `subject` varchar(250) NOT NULL,
  `message` text NOT NULL,
  `mdatetime` datetime NOT NULL,
  `senderid` varchar(25) NOT NULL,
  `reciverid` varchar(25) NOT NULL,
  PRIMARY KEY (`mailid`)
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=15 ;
--
-- Dumping data for table `mail`
--
INSERT INTO `mail` (`mailid`, `subject`, `message`, `mdatetime`, `senderid`, `reciverid`) VALUES
(10, 'sdfgfdg', 'dfgfdg', '2013-01-19 05:05:58', '0', 'admin'),
(12, 'fdgdfsgsd', 'fgdsfgdsfg', '2013-02-02 05:32:29', 'admin', '98682'),
(13, 'hello this is test pag', 'this is test page to all emp', '2013-02-02 05:33:00', 'admin', '98682'),
(14, 'good morning raj kiran', 'this is welcome page', '2013-02-02 05:36:16', 'admin', '98682');
-- --------------------------------------------------------
--
-- Table structure for table `registerdpayee`
--
CREATE TABLE IF NOT EXISTS `registerdpayee` (
  `slno` int(11) NOT NULL AUTO_INCREMENT,
  `payeename` varchar(25) NOT NULL,
  `accountnumber` varchar(25) NOT NULL,
  `accounttype` varchar(25) NOT NULL,
  `bankname` varchar(25) NOT NULL,
  `ifsccode` varchar(25) NOT NULL,
  PRIMARY KEY (`slno`)
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=102 ;
--
-- Dumping data for table `registerdpayee`
--
INSERT INTO `registerdpayee` (`slno`, `payeename`, `accountnumber`, `accounttype`, `bankname`, `ifsccode`) VALUES
(101, 'arpitha', '26548', 'saving', 'canarabank', 'KARB0000404');
-- --------------------------------------------------------
--
-- Table structure for table `transaction`
--
CREATE TABLE IF NOT EXISTS `transaction` (
  `transactionid` int(10) NOT NULL AUTO_INCREMENT,
  `transactiondate` date NOT NULL,
  `paymentdate` datetime NOT NULL,
  `payeeid` int(25) NOT NULL,
  `receiveid` int(10) NOT NULL,
  `debitac` varchar(25) NOT NULL,
  `amount` float(10,2) NOT NULL,
  `paymentstat` varchar(25) NOT NULL,
  PRIMARY KEY (`transactionid`)
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=2147483647 ;
--
-- Dumping data for table `transaction`
--
INSERT INTO `transaction` (`transactionid`, `transactiondate`, `paymentdate`, `payeeid`, `receiveid`, `debitac`, `amount`, `paymentstat`) VALUES
(2147483647, '2012-12-13', '2012-12-03 04:21:10', 111232154, 0, '150000', 100000.00, 'active');
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;

dbconnection.php - NO CHANGES NEEDED:
Code:
<?php
$con = mysql_connect("localhost","root","");
if (!$con)
{
    die('Could not connect: ' . mysql_error());
}
mysql_select_db("solarcash", $con);
?>

accounttransfer.php
Ok. So, for this file, whenever someone chooses Transfer From, it is supposed to show the current balance in the Current Balance field so the customer will know if they have enough to transfer.
Code:
<?php
session_start();
include("header.php");
require("dbconnection.php");
include("functions/inactive_session_logout.php");
$to = mysql_query("SELECT accno FROM accounts");
$from = mysql_query("SELECT accno FROM accounts");
$currbal = mysql_query("SELECT accountbalance FROM accounts WHERE accno AND customerid='$_SESSION[customerid]'");
while($currbal = mysql_fetch_array($currbal))
{
    $currbal = $_POST['accountbalance'];
}
//$result = mysql_query("SELECT * FROM accounts WHERE customers='$_SESSION[customerid]'");
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html>
<head>
<meta name="generator" content="HTML Tidy for Linux (vers 25 March 2009), see www.w3.org">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>Account Transfer</title>
<script type="text/javascript">
function onindexchange($currbal)
{
    if(Form1.transferfrom.options[Form1.transferfrom.selectedIndex].text == "transferfrom[0]")
    {
        db.accounts(function(accountbalance)
        {
            accountbalance.executeSql("SELECT accountbalance FROM accounts WHERE accno;",
                          [parseInt($currbal)], selectedRowValues, errorHandler);
        });
    };
    selectedRowValues = function(accountbalance,results)
    {
        var row = results.transferfrom.item(i);
        alert(row['accountbalance']);
    };
}
</script>
<style type="text/css">
div.c1 {text-align: right}
</style>
</head>
<body>
<div id="templatemo_main">
  <div id="templatemo_content">
    <form id="form1" name="form1" method="post" action="accounttransfer2.php" onsubmit="return validateForm()">
      <h2>Make Account Transfer</h2>
      <table width="513" border="1">
        <tr>
          <td><strong>Transfer To:</strong></td>
          <td>
            <select name="transferto" id="transferto">
            <option value="">Select</option>
            <?php
            while($transferto = mysql_fetch_array($to, MYSQL_BOTH))
            {
                echo "<option>$transferto[0]</option>";
            }
            ?>
            </select>
          </td>
        </tr>
        <tr>
          <td><strong>Transfer Amount:</strong> </td>
          <td><input type="text" name="amount" id="amount"></td>
        </tr>
        <tr>
          <td><strong>Transfer From:</strong></td>
          <td>
            <select name="transferfrom" id="transferfrom" onclick='onindexchange()'>
            <option value="">Select</option>
            <?php
            while($transferfrom = mysql_fetch_array($from, MYSQL_BOTH))
            {
                echo "<option>$transferfrom[0]</option>";
            }
            ?>
            </select>
          </td>
        </tr>
        <tr>
          <td><strong>Current Balance:</strong> </td>
          <td><input name="currbal" type="text" value="<?php echo $currbal; ?>" readonly></td>
        </tr>
        <tr>
          <td colspan="2">
            <div class="c1"><input type="submit" name="transfer1" id="transfer1" value="Transfer"></div>
          </td>
        </tr>
      </table>
    </form>
    <div class="cleaner_h50"></div>
  </div><!-- end of content -->
  <div id="templatemo_sidebar">
    <?php
    include("custsidebar.php");
    payloans();
    ?>
    <div class="cleaner_h40"></div>
  </div>
  <div class="cleaner"></div>
</div><!-- end of main -->
<div id="templatemo_main_bottom"></div><!-- end of main -->
</body>
</html>
<?php
include("footer.php");
?>

accounttransfer2.php
  • On this page, if the Transfer To and Transfer From account numbers are the same, and/or, if no amount is entered on the previous page, there are supposed to be errors telling you to go back and correct the problem after the transfer password is entered and confirmed.
  • Also, if the transfer password isn't in the database, it supposed to give an error. The only reason I don't have it is because I don't know how to program a password search in order to accomplish it.
  • Lastly, it's not deducting money from one account and inserting it into the other.
Code:
<?php
session_start();
include("header.php");
include("dbconnection.php");
include("functions/inactive_session_logout.php");

$to = $_POST['transferto'];
$from = $_POST['transferfrom'];
$amount = $_POST['amount'];

/*if(isset($_POST['transfer1']))
{
        else
        {
                $result1 = mysql_query("SELECT * FROM accounts WHERE accountsid='$to'");
                $result2 = mysql_query("SELECT * FROM accounts WHERE accountsid='$from'");
        }
}
$transferarray = mysql_query("SELECT * FROM accounts");*/





if(isset($_POST["transfer2"]))
{
        //$newbal = $_POST['currbal'] + $_POST['amount'];

        if($_POST[trpass] == $_POST[conftrpass])
        {
                if($to === $from)
                {
                        $error = "The account numbers are the same.<br>
                                  Please <button onclick=\"history.go(-1);\">Go Back</button>
                                  and choose a different account number.";
                }
                elseif($amount == "")
                {
                        $error = "No amount has been entered.<br>
                                  Please <button onclick=\"history.go(-1);\">Go Back</button>
                                  and enter an amount.";
                }
                else
                {
                        $error = "Failed to transfer";
                }
                if($to == TRUE)
                {
                        $from = mysql_query("SELECT accountbalance FROM accounts WHERE accno='.$from.'
                                                                                 AND customerid='$_GET[customerid]'");
                        while($from = mysql_fetch_array($from, MYSQL_BOTH))
                        {
                                if($amount > $from[0])
                                {
                                        $error = "Amount insufficient!";
                                        $forward = false;
                                }
                                else
                                {
                                        $sql = ("UPDATE accounts SET accountbalance = accountbalance - $amount WHERE accno = '.$from.'");
                                        $sql = ("UPDATE accounts SET accountbalance = accountbalance + $amount WHERE accno = '.$to.'");
                                        $currbal = mysql_query("SELECT accountbalance FROM accounts WHERE accno = '.$to.'");

                                        if (mysql_query($sql))
                                        {
                                                // succeeded
                                                $result1="INSERT INTO transaction(recipient,
                                                                                  payeeid,
                                                                                  depositac,
                                                                                  transactionmethod,
                                                                                  transactiontype,
                                                                                  accountbalance,
                                                                                  transactiondate)VALUES('$_POST[accno] $to',
                                                                                                         '$_POST[accno] $from',
                                                                                                         '$_POST[amount]',
                                                                                                         'Cash',
                                                                                                         'Transfer',
                                                                                                         '$_POST[currbal]',
                                                                                                         '$_POST[date]')";
                                                header("Location: accounttransfer3.php");
                                        }
                                }
                        }
                        if (!mysql_query($sql,$con))
                        {
                                die('Error: ' . mysql_error());
                        }
                }
        }
        mysql_close($dbc);






                /*mysql_query ("UPDATE `` SET `` = `accountbalance` + `.$amount.`
                                                WHERE `` = `..`");
                                                //AND customerid='$_GET[customerid]'");*/





                /*while($res = mysql_fetch_array($to, MYSQL_BOTH))
                {
                        $updateamount = $res[0]+$amount;

                        mysql_query("UPDATE accounts SET accountbalance='$updateamount'
                                                     WHERE accno='$to'
                                                     AND customerid='$_GET[customerid]'");
                }*/





        /*else
        {
                $passerr = "<b>Invalic password entered...<br> Please re-enter transaction password</b>";
                $payto = $_POST[paytoo];
                $payamt = $_POST[amt];
                $payacno= $_POST[payeeid];
        }*/
}
//$acc= mysql_query("select * from accounts where customer_id='$_SESSION[customer_id]'");
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html>
<head>
<meta name="generator" content="HTML Tidy for Linux (vers 25 March 2009), see www.w3.org">
<script type="text/javascript">
function validateForm()
{
        var x=document.forms["form1"]["trpass"].value;
        var y=document.forms["form1"]["conftrpass"].value;

        if (x==null || x=="")
        {
                alert("Transaction password must be filled out.");
                return false;
        }
        if (y==null || y=="")
        {
                alert("Please confirm your tranaction password.");
                return false;
        }
        if (x !== y)
        {
                alert("Transaction passwords do not match.");
                return false;
        }
}
</script>
<link rel="stylesheet" type="text/css" href="../css/form_style_view.css">
<title></title>

<style type="text/css">
 div.c6 {width:372px;}
 div.c5 {border-top:1px solid #000;}
 div.c4 {text-align:right; border:0px;}
 div.c3 {border:0px; width:170px;}
 div.c2 {border:0px;}
 div.c1 {text-align:center; border:1px;}
</style>
</head>
<body>
<div id="templatemo_main">
<div id="templatemo_content">
<form id="form1" name="form1" method="post" action="accounttransfer3.php" onsubmit="return validateForm()">
<h2>Account Transfer 2:</h2>
<div class="m c6">
<div class="c1"><?php echo $error; ?></div>
<div class="c5">
<div class="l c2"><strong>Transfer To:</strong></div>
<div class="r c3"><?php echo $to; ?></div>
<div class="clear"></div>
<div class="l c2"><strong>Transfer Amount:</strong></div>
<div class="r c3"><?php echo number_format($amount,2); ?></div>
<div class="clear"></div>
<div class="l c2"><strong>Transfer From:</strong></div>
<div class="r c3"><?php echo $from; ?></div>
<div class="clear"></div>
<div class="l c2"><strong>Enter Transaction Password</strong></div>
<div class="r c3"><input name="trpass" type="password" id="trpass"></div>
<div class="clear"></div>
<div class="l c2"><strong>Confirm Password</strong></div>
<div class="r c3"><input name="conftrpass" type="password" id="conftrpass"></div>
<div class="clear"></div>
<div class="c4"><input type="submit" name="Transfer2" id="Transfer2" value="Transfer Funds"> <input type="button" onclick="window.location.href='transferfunds.php'" name="button" id="button"

value="Cancel"></div>
</div>
</div>
</form>
</div>
<div class="cleaner_h50"></div>
</div>
<!-- end of content -->
<div class="cleaner"></div>
<!-- end of main -->
<div id="templatemo_main_bottom"></div>
<!-- end of main -->
</body>
</html>

accounttransfer3.php
This file is supposed to show the Recipient's account number, old balance and now balance, but, it only shows one. It doesn't switch depending on the recipient.
Code:
<?php
session_start();
include("header.php");
require("dbconnection.php");
include("functions/inactive_session_logout.php");

$to = $_POST['accountnumber'];
$tranaction = mysql_query("SELECT * FROM transaction");

$trans = mysql_query("SELECT * FROM transaction WHERE transactionid");

while($rows = mysql_fetch_array($trans))
{
    $recipient = $rows['accountnumber'];
    $oldbal = $rows['oldaccountbalance'];
    $newbal = $rows['accountbalance'];
}
mysql_close($con);
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<link rel="stylesheet" type="text/css" href="../css/form_style_view.css">
<title>Account Transaction 3</title>
</head>

<body>
<div id="templatemo_main">
  <span class="main_top"></span>
  <div id="templatemo_content">
    <h2>&nbsp; Transaction Detail:</h2>
    <div style="width:439px; height:70px; border:1px solid #000; text-align:center;">
      <h4>
        <?php
        echo "Account Transfer Complete Successful...";
        ?><br>
        <table width="513" border="1">
          <tr>
            <td><strong>Recipient:</strong></td>
            <td><?php echo $recipient; ?></td>
          </tr>
          <tr>
            <td><strong>Old Balance:</strong> </td>
            <td><?php echo $oldbal; ?></td>
          </tr>
          <tr>
            <td><strong>New Balance:</strong></td>
            <td><?php echo $newbal; ?></td>
          </tr>
        </table>
      </h4>
    </div>
    <div class="cleaner_h50"></div>
  </div><!-- end of content -->
  <div class="cleaner"></div>
</div><!-- end of main -->
<div id="templatemo_main_bottom"></div><!-- end of main -->
</body>
</html>

Please help. Thanks.

Print this item

Anyone run their zpanel/sentora webserver in hyper-v?
Posted by: kellenw - 10-17-2014, 01:36 PM - Forum: General Discussions (Non-Support Related) - Replies (1)

Just curious.  I have a very capable Windows 2012 r2 hyper-v server that hosts a few Windows 2008 r2 and Windows 2003 r2 VMs, and it's got plenty of resources left over.  I've been considering converting my bare metal Ubuntu webserver to a VM on this host, but I'm wondering if anyone else has done this, and what their experience has been.

Print this item