Esempio n. 1
0
        return false;
    }
}
function getEventContent($pdo, $place)
{
    $sql = "SELECT content FROM event WHERE id = :place";
    $statement = $pdo->prepare($sql);
    $statement->bindValue(':place', $place, PDO::PARAM_INT);
    $statement->execute();
    if ($rows = $statement->fetchAll(PDO::FETCH_ASSOC)) {
        return $rows[0]['content'];
    } else {
        return false;
    }
}
$event_name = getEventName($db, $place);
//print $event_name;
$event_content = getEventContent($db, $place);
//print $event_content;
$rows = $db->query("SELECT id,event_id,name,type,thumb_data,date FROM image WHERE event_id = {$place}")->fetchAll();
$rows = $rows[0];
var_dump($rows['name']);
?>
<!DOCTYPE html>
<html lang="ja">
<head>
	<meta charset="utf-8">
	<title>index</title>
</head>
<body>
<div>
Esempio n. 2
0
if ($session) {
    $session->updateFormFields();
    $session->loadRefActor();
    $pdus = cutPacket($message);
    foreach ($pdus as $key => $pdu) {
        $event = "";
        $datas = "";
        if ($pdu == "TCP_Open") {
            $event = $pdu;
            $datas = null;
        } elseif ($pdu == "TCP_Closed") {
            CApp::rip();
        } else {
            $datas = $pdu;
            $type = unpack("H*", substr($pdu, 0, 1));
            $event = getEventName($type[1]);
        }
        $ack = $session->handleEvent($event, $pdu);
        $session->store();
        if ($ack) {
            echo base64_encode($ack);
        } else {
            echo " ";
        }
    }
}
CApp::rip();
/**
 * Return the session corresponding to the ip adress of the sender
 * 
 * @param string  $addr The ip adress
Esempio n. 3
0
<div style="float:left;" id=fblogdetail{$cnt}><a href="javascript:void(0);" title="{$r->content}" onclick="showHide('logdetail{$cnt}')">Show Items</a></div>
<div style="padding:6px;margin:4px;border:1px #eee solid;width:250px;float:left;display:none;" id="logdetail{$cnt}">{$r->content}</div>
</div>
<br clear="all">
</li>

EOHTML;
        $cnt++;
    }
    $bodyHTML .= "</ul>";
    ?>

<?php 
    $summaryHTML .= "<tr><td>No of Events in the last {$days} days:</td><td>{$row_count}</td></tr>";
    foreach ($totals as $key => $value) {
        $name = getEventName($key);
        $summaryHTML .= "<tr><td>Total {$name}:</td><td>{$value}</td></tr>";
    }
}
$summaryHTML .= "</table><br clear=all>";
?>

<h1>Site Log</h1>

<div style="float: right; font-size: 80%; width: 350px;">

	<form role="form" action="<?php 
echo $_SERVER['PHP_SELF'];
?>
" method=get>
		<fieldset>
Esempio n. 4
0
<?php

require_once './functions.php';
if (!isset($_POST['eventNo'])) {
    die("No event number provided");
}
$eventNo = mysql_real_escape_string($_POST['eventNo']);
$replacement = mysql_real_escape_string($_POST['replacement']);
$reason = mysql_real_escape_string($_POST['reason']);
//if they didn't specify a reason, don't let them off the hook
if ($reason == "") {
    die("You need a reason.  Try again.<br><div class='btn' id='retryAbsenceButton' value='{$eventNo}'>try again</div>");
}
$attendanceOfficers = implode(", ", getPosition("Vice President")) . ", " . implode(", ", getPosition("President"));
# TODO Check for duplicate queries and display an error message if a request has already been submitted for this event
if (!mysql_query("insert into `absencerequest` (reason,memberID,eventNo) values ('{$reason}','{$USER}','{$eventNo}')")) {
    die("Query failed: " . mysql_error());
}
$mail = sendMessageEmail($attendanceOfficers, $USER, 'Name:  ' . fullNameFromEmail($USER) . '<br>Event:  ' . getEventName($eventNo) . '<br>Reason:  ' . $reason, 'Absence Request on Gree-C-Web');
echo "<p>Your request has been submitted.  You lazy bum!</p>";
 /**
  * Function to translate game dependant terms to a readable format
  * Based on game configs in /configs/games
  *
  * @param $xlrDB string currently
  * @param $item integer team
  * @internal param \currently $xlrDB used xlrstats database
  * @internal param \team $item /weapon/map/event/bodypart
  * @return string translated string as configured in /configs/games/
  */
 public function getItemName($xlrDB, $item)
 {
     //config('/classes/xlrstats.server.inc';
     $XlrServer = new XlrServer();
     $gameName = (string) $XlrServer->serverStatus($xlrDB)->Game->attributes()->Name;
     config('games/' . $gameName . '.php');
     if ($item == 'team') {
         $temp = getTeamName();
     } elseif ($item == 'weapon') {
         $temp = getWeaponName();
     } elseif ($item == 'map') {
         $temp = getMapName();
     } elseif ($item == 'event') {
         $temp = getEventName();
     } elseif ($item == 'bodypart') {
         $temp = getBodypartName();
     } else {
         $temp = __('Undefined Item');
     }
     return $temp;
 }
Esempio n. 6
0
        }
    }
    if (count($currEvents) == 1) {
        $eventName = $currEvents[0];
    } else {
        echo "ERROR: Not a single event fits this offset: " . $offset . json_encode($events) . " (" . date($baselineDate) . " " . $assessmentDate . " " . json_encode($currEvents) . ")\n";
        exit(1);
    }
    return $eventName;
}
$events = getListOfEvents($token);
$result = getConsentInfo($pGUID, $token);
$now = date('m/d/Y');
$baselineDate = date_create_from_format('Y-m-d H:i', $result['baselineDate']);
//echo ($baselineDate->format('m/d/Y') . " " . $result['baselineDate']);
$event_name = getEventName($baselineDate->format('m/d/Y'), $now, $events);
$payload = array("id_redcap" => $pGUID, "redcap_event_name" => $event_name, "image_data_send_date" => date('Y-m-d H:i'));
$data = array('token' => $token, 'content' => 'record', 'format' => 'json', 'type' => 'flat', 'overwriteBehavior' => 'normal', 'data' => '[' . json_encode($payload) . ']', 'returnContent' => 'count', 'returnFormat' => 'json');
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://abcd-rc.ucsd.edu/redcap/api/');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_VERBOSE, 0);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
if ($proxy != "") {
    curl_setopt($ch, CURLOPT_PROXY, $proxy);
    curl_setopt($ch, CURLOPT_PROXYTYPE, CURLPROXY_HTTP);
    curl_setopt($ch, CURLOPT_PROXYPORT, $proxyport);
}
curl_setopt($ch, CURLOPT_AUTOREFERER, true);
curl_setopt($ch, CURLOPT_MAXREDIRS, 10);
Esempio n. 7
0
                        <th scope="col">Code</th>
                        <th scope="col">Event Name</th>
                        <th scope="col">Group Name</th>
                    </tr>
                </thead>
                <tbody>
<?php 
foreach ($DETAILS['group_events'] as $event_id => $group_name) {
    ?>
                <tr>
                    <td><?php 
    print getEventCode($event_id);
    ?>
</td>
                    <td><?php 
    print getEventName($event_id);
    ?>
</td>
                    <td><?php 
    print $group_name;
    ?>
</td>
                </tr>
<?php 
}
?>
                </tbody>
            </table>
        </div>
    </body>
</html>
Esempio n. 8
0
File: rg2api.php Progetto: AtleH/rg2
function getSplitsbrowser($eventid)
{
    $page = file_get_contents("html/splitsbrowser.html");
    $eventname = getEventName($eventid);
    $page = str_replace('<EVENT_NAME>', $eventname, $page);
    if (defined('DEBUG')) {
        $page = str_replace('DEBUG_CLOSE', "", $page);
        $page = str_replace('DEBUG', "", $page);
        $page = str_replace('MINIFIED_CLOSE', "--", $page);
        $page = str_replace('MINIFIED', "!--", $page);
    } else {
        $page = str_replace('DEBUG_CLOSE', "--", $page);
        $page = str_replace('DEBUG', "!--", $page);
        $page = str_replace('MINIFIED_CLOSE', "", $page);
        $page = str_replace('MINIFIED', "", $page);
    }
    $page = str_replace('<SPLITSBROWSER_DIRECTORY>', SPLITSBROWSER_DIRECTORY, $page);
    $result_data = getResultsCSV($eventid);
    $page = str_replace('<SPLITSBROWSER_DATA>', $result_data, $page);
    return $page;
}
Esempio n. 9
0
function getUserDetails($gotoaction, $pmcId, $userBookletId)
{
    global $STARTSCRIPTS;
    $smarttable = smarttable::render(array('user_table'), null);
    $STARTSCRIPTS .= "initSmartTable();";
    $userEventListTable = "";
    $userBookletId = escape($userBookletId);
    $pmcId = escape($pmcId);
    $userEventListTable .= searchByUserId($gotoaction, $pmcId);
    if ($userBookletId[0] == 'P') {
        $userId = getUserIdFromBookletId($userBookletId, $pmcId);
    } else {
        $userId = $userBookletId;
    }
    $getUserDetailsQuery = "SELECT * FROM `events_participants` WHERE `user_pid`='{$userId}' AND `page_moduleComponentId`='{$pmcId}' AND `event_id` IN(SELECT `event_id` FROM `events_locked` WHERE `page_moduleComponentId`='{$pmcId}')";
    $getUserDetailsRes = mysql_query($getUserDetailsQuery) or displayerror(mysql_error());
    if (mysql_num_rows($getUserDetailsRes) == 0) {
        displayerror("No info found.");
    } else {
        $getUserNameQuery = "SELECT `user_fullname` FROM `" . MYSQL_DATABASE_PREFIX . "users` WHERE `user_id`='{$userId}'";
        $getUserNameRes = mysql_query($getUserNameQuery) or displayerror(mysql_error());
        $userEventListTable .= "<br/><h4>" . mysql_result($getUserNameRes, 0) . "</h4><br/>";
        $userEventListTable .= <<<FORM
\t\t\t<form method='post' action='./+{$gotoaction}&subaction=printUserCerti'>
\t\t\t\t<input type='hidden' value='{$userId}' name='userId'/>
\t\t\t\t<input type='submit' name='submit' value='Print User Certificates'/>
\t\t\t</form>
FORM;
        $userEventListTable .= "{$smarttable}<table id='user_table' class='display' width='100%' border='1'><thead><th>User FID</th><th>Event Name</th><th>User Rank</th></thead>";
        while ($userEvent = mysql_fetch_assoc($getUserDetailsRes)) {
            $eventName = getEventName($pmcId, $userEvent['event_id']);
            $getUserRankQuery = "SELECT `user_rank` FROM `events_result` WHERE `page_moduleComponentId`='{$pmcId}' AND `user_id`='{$userId}' AND `event_id`='{$userEvent['event_id']}'";
            $getUserRankRes = mysql_query($getUserRankQuery) or displayerror(mysql_error());
            $userRank = mysql_result($getUserRankRes, 0);
            $userEventListTable .= "<tr><td>" . $userId . "</td><td>" . $eventName . "</td><td>" . $userRank . "</td></tr>";
        }
        $userEventListTable .= "</table>";
        return $userEventListTable;
    }
}
Esempio n. 10
0
        echo '    <td>' . $message['date_publication'] . '</td>' . "\n";
        echo '</tr>' . "\n";
    }
}
echo '</table>';
if (!$contents['invitations']) {
    echo "<h1> Pas de nouvelle invitation à des évènements reçue</h1>";
} else {
    $invitation_existe = True;
    foreach ($contents['invitations'] as $i => $invitation) {
        if (isset($invitation['id_expediteur'])) {
            if ($invitation_existe) {
                echo '<h2>Vous avez été invité aux évènements suivants :</h2>';
                $invitation_existe = False;
            }
            echo '<div class="message_invitation"> <a href="' . getLink(["membres", "profil", '' . $invitation['id_expediteur'] . '']) . '">' . getUserName($invitation['id_expediteur'])[0]["pseudo"] . '</a>' . ' vous invite à participer à l&#39;évènement &#34;<a href="' . getLink(["events", "display", '' . $invitation['id_evenement'] . '']) . '">' . getEventName($invitation['id_evenement'])[0]["titre"] . '</a>&#34; !<br></div>';
        }
    }
    if ($invitation_existe == True) {
        echo "<h1> Pas de nouvelle invitation à des évènements reçue</h1>";
    }
}
?>
    <h2>Envoyer un message privé</h2>
    <div id='zone-envoi'>
        <form method="post" action="<?php 
echo getLink(['membres', 'messages']) . '#zone-envoi';
?>
">
            <div id='zone-texte'>
                <div id='champ1'>