Ejemplo n.º 1
0
<!DOCTYPE html>
<html>
  <head></head>
  <body>
    <p>
        <!DOCTYPE html>
<html>
  <head></head>
  <body>
    <p>
        <?php 
/**
 * Write a function that takes a "name" and "number" (n)
 * print the name (n) times
 */
$name = 'Heather';
$num = 8;
function theName($name, $num)
{
    echo str_repeat($name, $num);
}
theName($name, $num);
?>
    </p>
  </body>
</html>

    </p>
  </body>
</html>
Ejemplo n.º 2
0
                $adIDs[] = $row['id'];
                $results["ad-{$row['id']}"] = array('type' => $gsprache->addon, 'id' => $row['id'], 'name' => $row['menudescription'], 'owner' => '', 'edit' => '?w=ad&amp;d=md&amp;id=' . $row['id'], 'delete' => '?w=ad&amp;d=dl&amp;id=' . $row['id']);
            }
        }
        if ($im == true) {
            $query = $sql->prepare("SELECT `id`,`description` FROM `servertypes` WHERE `resellerid`=? " . notIN($imIDs, '`id`') . " AND (LOWER(`description`) LIKE ? OR `shorten` LIKE ?)");
            $query->execute(array($reseller_id, $word, $word));
            foreach ($query->fetchAll(PDO::FETCH_ASSOC) as $row) {
                $imIDs[] = $row['id'];
                $results["im-{$row['id']}"] = array('type' => $gsprache->gameserver . ' ' . $gsprache->templates, 'id' => $row['id'], 'name' => $row['description'], 'owner' => '', 'edit' => '?w=im&amp;d=md&amp;id=' . $row['id'], 'delete' => '?w=im&amp;d=dl&amp;id=' . $row['id']);
            }
        }
        if ($us == true) {
            if ($reseller_id == 0) {
                $notIN = count($usIDs) > 0 ? '`id` NOT IN(' . implode(',', $usIDs) . ') AND ' : '';
                $query = $sql->prepare("SELECT `id`,`cname`,CONCAT(`vname`,' ',`name`) AS `username` FROM `userdata` WHERE {$notIN} (`cname` LIKE :word OR vname LIKE :word OR name LIKE :word)");
                $query->execute(array(':word' => $word));
            } else {
                $query = $sql->prepare("SELECT `id`,`cname`,CONCAT(`vname`,' ',`name`) AS `username` FROM `userdata` WHERE `resellerid`=:resellerID " . notIN($usIDs, '`id`') . " AND (`cname` LIKE :word OR vname LIKE :word OR name LIKE :word)");
                $query->execute(array(':resellerID' => $admin_id == $reseller_id ? $reseller_id : $admin_id, ':word' => $word));
            }
            foreach ($query->fetchAll(PDO::FETCH_ASSOC) as $row) {
                $usIDs[] = $row['id'];
                $results["us-{$row['id']}"] = array('type' => $gsprache->user, 'id' => $row['id'], 'name' => theName($row['username'], $row['cname']), 'owner' => '', 'edit' => '?w=us&amp;d=md&amp;id=' . $row['id'], 'delete' => '?w=us&amp;d=dl&amp;id=' . $row['id']);
            }
        }
    }
}
configureDateTables('-1', '1, "desc"');
$q = implode(' ', $q);
$template_file = 'admin_search.tpl';