function publish_art($publish, $read, $bs) { if (auth(4)) { if ($publish == 'on') { update($bs, 're', 1, 'id', $read); send_user_mail($_SESSION['read'], 'published_art'); if ($bs == 'qdi') { send_track_to_user($read); } } elseif ($publish == 'off') { update($bs, 're', 0, 'id', $read); } } }
function publish_art($publish, $read, $bs) { if (auth(4)) { $base = $_SESSION[$bs]; if ($publish == "on") { update($bs, "re", 1, "id", $read); send_user_mail($_SESSION['read'], 'published_art'); if ($bs == 'qdi') { send_track_to_user($read); } } elseif ($publish == "off") { update($bs, "re", 0, "id", $read); } } else { alert(btn("txtalert", "bruu you cant do that")); } }