<?php
/**************************************************************************
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.
@Authors: Ryan Thompson(hide@address.com)
***************************************************************************/
$db->query("SELECT * FROM o_home_layout WHERE user_id='1'");
$i = 0;
while($db->fetch_results())
{
$data[$i] = $db->record['service'];
$i++;
}
$i = 0;
while($i < count($data))
{
$db->query("INSERT INTO o_home_layout (user_id, position, service) VALUES ('". $user_id ."', '$i','$data[$i]')");
$i++;
}