本文整理汇总了PHP中interPool::dbLog方法的典型用法代码示例。如果您正苦于以下问题:PHP interPool::dbLog方法的具体用法?PHP interPool::dbLog怎么用?PHP interPool::dbLog使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类interPool
的用法示例。
在下文中一共展示了interPool::dbLog方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: values
if (isset($_GET["tab"])) {
$sess->setSessVar('tab_admin', $_REQUEST["tab"]);
}
$tab = $sess->getSessVar('tab_admin', '');
// Formulaire de la gestion de la config du draft online des séries
if (isset($_REQUEST["submit_configDraftSeries"])) {
if (isset($_REQUEST["configDraftSeries"])) {
// check if one record already exists in the table. If not, we create one empty...
$query = "select * from draft_series_config\n where id_pool = {$id_pool}\n and saison_id = {$id_saison}";
$resultID = mysql_query($query, $pool->handle);
$data = mysql_fetch_array($resultID);
if ($data == "") {
$query = "insert into draft_series_config (id_pool,saison_id) values ({$id_pool},{$id_saison})";
mysql_query($query, $pool->handle);
if (mysql_affected_rows() > 0) {
$pool->dbLog($id_pool, $gerant, "admin_configDraftSeries", $query);
}
}
mysql_free_result($resultID);
foreach ($_REQUEST["configDraftSeries"] as $key => $value) {
$query = "update draft_series_config set {$key}='{$value}'\n where id_pool = {$id_pool}\n and saison_id = {$id_saison}";
mysql_query($query, $pool->handle);
if (mysql_affected_rows() > 0) {
$pool->dbLog($id_pool, $gerant, "admin_configDraftSeries", $query);
}
}
}
}
// Formulaire de la gestion des gérants participant aux séries
if (isset($_REQUEST["configDraftSeries_gerants_action"]) && $_REQUEST["configDraftSeries_gerants_action"] != "") {
$action = $_REQUEST["configDraftSeries_gerants_action"];
示例2: isset
$player_first_name = $_REQUEST["player_first_name"];
$player_last_name = $_REQUEST["player_last_name"];
$player_pos = $_REQUEST["pos_cb"];
$player_actif = "Y";
$player_prospect = isset($_REQUEST["prospect"]) ? "Y" : "N";
$player_hockeydb_id = $_REQUEST["player_hockeydb_id"];
$player_hasbeen = isset($_REQUEST["hasbeen"]) ? "Y" : "N";
$player_birthday = $_REQUEST["player_birthday"];
if ($id_player == "" && ($player_first_name == "" || $player_last_name == "")) {
$message = "Aucun joueur sélectionné...<br>Si vous voulez ajouter un joueur, il faut au minimum que les champs 'prénom' et 'nom' soient remplis.";
} else {
if ($id_player != "") {
$query = "UPDATE interactivePool.nhl_players SET first_name=\"{$player_first_name}\",last_name=\"{$player_last_name}\",\n\t pos=\"{$player_pos}\",actif=\"{$player_actif}\",prospect=\"{$player_prospect}\",\n\t id_hockeydb=\"{$player_hockeydb_id}\",has_been=\"{$player_hasbeen}\",birthday=\"{$player_birthday}\"\n\t WHERE id = {$id_player}\n\t AND date_activation <= \"{$pool->today}\"\n\t AND date_expiration > \"{$pool->today}\"";
mysql_query($query, $pool->handle);
if (mysql_affected_rows() > 0) {
$pool->dbLog($id_pool, $gerant, "admin_update_player_fiche", $query);
}
} else {
// ajout d'un nouveau joueur
// il faut avoir le dernier id de la table nhl_players
$query = "SELECT id FROM nhl_players ORDER BY id DESC LIMIT 1";
$resultID = mysql_query($query, $pool->handle);
$data = mysql_fetch_array($resultID);
mysql_free_result($resultID);
$last_id = $data["id"];
$new_id = $last_id + 1;
$date_activation = $pool->today;
$date_expiration = "2099-12-31";
$query = "INSERT INTO nhl_players (id,first_name,last_name,team,pos,\n\t date_activation,date_expiration,actif,prospect,id_hockeydb,\n\t has_been,birthday)\n\t VALUES ({$new_id},\"{$player_first_name}\",\"{$player_last_name}\",{$edit_player_sel_team},\n\t \"{$player_pos}\",\"{$date_activation}\",\n\t \"{$date_expiration}\",\"{$player_actif}\",\"{$player_prospect}\",\n\t \"{$player_hockeydb_id}\",\"{$player_hasbeen}\",\"{$player_birthday}\")";
mysql_query($query, $pool->handle);
if (mysql_affected_rows() > 0) {
示例3:
$my_cote_prospect = $my_cote_prospectA[$id_player];
$my_nhlpa = $my_nhlpaA[$id_player];
$my_nhlId = $my_nhlIdA[$id_player];
$my_rotowireId = $my_rotowireIdA[$id_player];
$my_rotoworldId = $my_rotoworldIdA[$id_player];
$my_hockeynewsId = $my_hockeynewsIdA[$id_player];
$my_yahooId = $my_yahooIdA[$id_player];
$player_old_team = $player_old_teamA[$id_player];
$player_old_pos = $player_old_posA[$id_player];
// si l'équipe change, on expire l'ancien code du joueur et on insère le
// nouveau.
if ($my_team_id != $player_old_team) {
$query51 = "UPDATE interactivePool.nhl_players SET date_expiration='{$pool->today}'\n WHERE id = {$id_player}\n and date_expiration = '2099-12-31'";
mysql_query($query51, $pool->handle);
if (mysql_affected_rows() > 0) {
$pool->dbLog($id_pool, $gerant, "admin_update_player_tableau", $query51);
}
# au cas où j'ajouterais des colonnes à la table nhl_players, je vais faire une copie du record dans une
# table temporaire, faire les modifications appropriées et transférer l'info dans la table nhl_players.
$query50 = "create temporary table if not exists interactivePool.nhl_players_temp like interactivePool.nhl_players";
mysql_query($query50, $pool->handle);
$query50 = "insert into interactivePool.nhl_players_temp\n select * from interactivePool.nhl_players\n where id = {$id_player}\n and date_expiration = '{$pool->today}'";
mysql_query($query50, $pool->handle);
if (mysql_affected_rows() > 0) {
$pool->dbLog($id_pool, $gerant, "admin_update_player_tableau", $query50);
}
if ($ep_aff_col_pos_checked != "") {
$query50 = "update interactivePool.nhl_players_temp set team={$my_team_id},date_expiration='2099-12-31',\n date_activation='{$pool->today}',pos='{$my_pos}'\n where id = {$id_player}\n and date_expiration = '{$pool->today}'";
} else {
$query50 = "update interactivePool.nhl_players_temp set team={$my_team_id},date_expiration='2099-12-31',\n date_activation='{$pool->today}'\n where id = {$id_player}\n and date_expiration = '{$pool->today}'";
}
示例4: values
echo "</script>\n";
}
if ($rtn == "cancel_ballotage") {
echo "<script type=\"text/javascript\">\n";
echo "alert('L\\'échange que vous venez d\\'accepter ne peut pas être complétée, car un des joueurs impliqué dans l\\'échange est donné en retour d\\'un ballotage.');";
echo "</script>\n";
}
if ($rtn == "approbation") {
echo "<script type=\"text/javascript\">\n";
echo "alert('Tous les échanges sont sous approbation du commissaire. Ce dernier y donnera suite dans les prochaines heures.');";
echo "</script>\n";
// envoie d'un email aux admin du pool (et TOUJOURS moi...)
$query = "insert into pgc.emails (id_pool,saison_id,`from`,`to`,subject,body)\n values (2,{$id_saison},13,13,\"{$poolName} - Transaction en attente d'approbation\",\"Aller sur le site en Admin pour approuver/supprimer la transaction.\")";
mysql_query($query, $pool->handle);
if (mysql_affected_rows() > 0) {
$pool->dbLog($id_pool, $gerant, "envoie_email_approbation", $query);
}
if ($id_pool != 8) {
$query = "insert into pgc.emails (id_pool,saison_id,`from`,`to`,subject,body)\n values (2,{$id_saison},13,11,\"{$poolName} - Transaction en attente d'approbation\",\"Aller sur le site en Admin pour approuver/supprimer la transaction.\")";
mysql_query($query, $pool->handle);
if (mysql_affected_rows() > 0) {
$pool->dbLog($id_pool, $gerant, "envoie_email_approbation", $query);
}
}
}
} else {
if ($accept_decline == "decline") {
$pool->tradePropositionDecline($id_pool, $id_tradeProposition, $gerant, $id_saison, $commentaire_refus);
} else {
if ($accept_decline == "cancel") {
$pool->tradePropositionCancel($id_pool, $id_tradeProposition, $gerant, $id_saison);