コード例 #1
0
function load_rewards($file)
{
    if (!file_exists($file)) {
        print "Unable to find rewards.lib.php\n";
        exit;
    }
    include_once $file;
    return os_poker_get_all_rewards();
}
コード例 #2
0
ファイル: poker.class.php プロジェクト: jakob-stoeck/os_poker
 public static function GetRewards()
 {
     $imagePath = file_directory_path() . "/poker_rewards/";
     $defaultPicture = $imagePath . "reward_default.jpg";
     include_once drupal_get_path('module', 'os_poker') . "/rewards.lib.php";
     $rewards = os_poker_get_all_rewards();
     foreach ($rewards as $name => $value) {
         if (file_exists($imagePath . $name . ".gif")) {
             $rewards[$name]["picture"] = $imagePath . $name . ".gif";
         } else {
             $rewards[$name]["picture"] = $defaultPicture;
         }
     }
     return $rewards;
 }