Example #1
0
<html>
    <head>
        <title>Add to my address book</title>
        <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
    </head>
    <body>
        <h1>Add to your address book.</h1>
        <form action="#" method="POST">
            Select an address group
            <select name="addressGroup">
                <?php 
$results = fetchGroups();
foreach ($results as $row) {
    ?>
                    <option value="<?php 
    echo $row['address_group_id'];
    ?>
"><?php 
    echo $row['address_group'];
    ?>
</option>
                <?php 
}
?>
  <!--this html form sets up fields for the user to enter values. these values are then entered into the database.
                                fields are repopulated if something is invalid.-->
            </select>
            <input type="text" name="fullName" value="<?php 
if (isPostRequest() && isset($_POST['fullName'])) {
            $liveDB->executeNoresSQL($sql, $affectedRows);
        } catch (DBAdapter2Exception $e) {
            print "\n" . date("d/m/y : H:i:s", time()) . " AUTO MYSQLl: Error: " . $e->getMessage() . " *** QUERY: {$sql}";
        }
    }
}
// the main execution
while (true) {
    echo "\nNext round ";
    $groups = fetchGroupsByUrl(300);
    if (count($groups) == 0) {
        echo "\n No more groups to find by url \n";
        break;
    }
    foreach ($groups as $group) {
        //echo "\n".$group['id_list']."\n\n";
        cleanGroup($group);
    }
}
while (true) {
    echo "\nNext round ";
    $groups = fetchGroups(300);
    if (count($groups) == 0) {
        echo "\n No more to find  by uniqueness \n";
        break;
    }
    foreach ($groups as $group) {
        //echo "\n".$group['id_list']."\n\n";
        cleanGroup($group);
    }
}
Example #3
0
    die;
}
$location = "/user/index.php";
if (!empty($_POST)) {
    $errors = array();
    $successes = array();
    $group_id = $_POST["groupId"];
    $deleted = deleteGroupMember($group_id, $loggedInUser->user_id);
    if ($deleted) {
        $successes[] = lang("GROUP_USER_UNSUBSCRIBE");
    } else {
        $errors[] = lang("GROUP_USER_UNSUBSCRIBE_FAILED");
    }
}
//Fetch information of groups where the user is member
$groupData = fetchGroups($loggedInUser->user_id);
require_once "{$path}/models/header.php";
?>

<body>
<script>
  function submiter(group_id)
  {
    document.getElementById("group_" + group_id).submit();
  }
</script>
  <div id='wrapper'>
    <?php 
include "{$path}/common/top.php";
?>
    <div id='content'>
        }
    }
}
// the main execution
foreach ($l_countries as $oneC) {
    echo "\n Anti duplicating jobs in " . $oneC['reg'] . " \n ";
    $liveDB = new DBAdapter2(array('host' => $dbConf->live->host, 'username' => $dbConf->live->username, 'password' => $dbConf->live->password, 'schema' => $oneC['schemali']));
    while (true) {
        echo "\nNext round(by URL) ";
        $groups = fetchGroupsBySameUrl(500, $oneC);
        if (count($groups) < 10) {
            echo "\n No more to find \n";
            break;
        }
        foreach ($groups as $group) {
            cleanGroup($group, $oneC);
        }
    }
    while (true) {
        echo "\nNext round ";
        $groups = fetchGroups(500, $oneC);
        if (count($groups) < 10) {
            echo "\n No more to find \n";
            break;
        }
        foreach ($groups as $group) {
            cleanGroup($group, $oneC);
        }
    }
    unset($liveDB);
}