Example #1
0
                    }
                    if ($fail != true) {
                        $possible[] = $color['id'];
                    }
                    $fail = false;
                }
                $count = count($possible);
                $num = rand(0, $count - 1);
                $item['color'] = $possible[$num];
            }
            $figure .= $item['settype'] . "-" . $item['set'] . "-" . $item['color'] . ".";
        }
    }
    $figure = substr($figure, 0, -1);
    return array($figure, $gender);
}
$count = 6;
$i = 0;
while ($i != $count) {
    $i++;
    $figure = generateFigure();
    $figure = $figure[0];
    $id = uniqid();
    echo '  <li id="' . $id . '" class="liFigure" onclick="changeAvatar(\'' . $figure . '\',\'' . $id . '\')"> <span class="bgtop"></span>
        <span class="bgbottom"></span>
        <img   alt="' . $figure . '" src="http://www.habbr.info/habbo-imaging/avatarimage?figure=' . $figure . '" width="64" class="avatar"  height="110"/>
    </li>';
}
?>

     
Example #2
0
                                                if (isBlank($img)) {
                                                    shell_exec("cd {$quakedir};cp -r ../../../plots/analysis/quake-map.* .");
                                                    shell_exec("cd {$quakedir};PYTHONPATH=. MPLCONFIGDIR=/tmp python quake-map.py");
                                                    $img = shell_exec("ls {$quakedir}/quake-map*.png");
                                                }
                                                // %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
                                                // RENDER
                                                // %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
                                                $referer = $_SERVER["HTTP_REFERER"];
                                                $SUBMENU .= <<<QUAKE
<a href="{$referer}">Back</a> | 
QUAKE;
                                                $SUBMENU .= "<a href='{$WEBSERVER}/?if=quaketide&quakeid={$quakeid}&action=calculate&qpreserve=1&qlat={$qlat}&qlon={$qlon}&qdepth={$qdepth}&qdatetime={$qdatetime}&qjd={$qjd}&hmoon={$hmoon}&hsun={$hsun}'>Tides</a>";
                                                preg_match("/__([^\\.]+).png/", $img, $matches);
                                                $plotmd5 = $matches[1];
                                                $plotfigure = generateFigure($quakedir, "quake-map", $plotmd5, "", "float:right;width:50%;", "", "");
                                                $CONTENT .= <<<QUAKE

  {$plotfigure}

<h3>Earthquake {$quakeid}</h3>

<h4>Basic information</h4>
<ul>
  {$basicinfo}
</ul>

<h4>Full information</h4>
<ul style="width:80%;word-wrap:break-word">
  {$fullinfo}
  {$noinfo}