Example #1
0
             }
             $uavatar = $chat['avatar'];
             if ($chat['hunter_color'] == 'system') {
                 $avatar_path = "{$icon_path}";
                 $uavatar = 'default_system_tumb.png';
             } else {
                 $avatar_path = 'avatar';
             }
             if ($uavatar == '' || $uavatar == 'default_avatar_tumb.png') {
                 $uavatar = 'default_avatar_tumb.png';
                 $avatar_path = "{$icon_path}";
             }
             $avatar = "<img class=\"avatar_chat\" src=\"{$avatar_path}/{$uavatar}\"/>";
             $message = emoprocess(uprocess($me, $me2, $chat['message']));
             if ($setting['allow_link'] == 1) {
                 $message = emoticon(linking($message, $use_theme));
             } else {
                 $message = emoticon($message);
             }
             echo "<li class=\"ch_logs {$lcolor}\"><div class=\"my_avatar chat_avatar_wrap2\">{$avatar}</div><div class=\"my_text\"><p><span class=\"username " . $chat['hunter_color'] . "\">" . $chat['hunter'] . "</span> : {$message}<span class=\"logs_date\">" . date("M j G:i", $chat['time']) . "</span></p></div><div class=\"clear\"></div></li>\n";
             if ($logs == 1) {
                 $logs = 2;
             } else {
                 $logs = 1;
             }
         }
     } else {
         echo "<li class=\"ch_logs system\"><div class=\"my_avatar chat_avatar_wrap2\"><img class=\"avatar_chat\" src=\"{$icon_path}/default_system_tumb.png\"/></div><div class=\"my_text\"><p><span class=\"username csystem\">{$lang_system}</span> : {$emptyprivate}<span class=\"logs_date\">" . date("M j G:i", $time) . "</span></p></div><div class=\"clear\"></div></li>\n";
     }
 } else {
     echo 99;
Example #2
0
* @copyright 2015
* @terms any use of this script without a legal license is prohibited
* all the content of Boomchat is the propriety of BoomCoding and Cannot be 
* used for another project.
*/
$load_setting = 'timezone, allow_theme, default_theme, language';
$load_user = '******';
require_once "config_lite.php";
require_once "content_process.php";
if ($user["user_access"] == 4) {
    $target = $mysqli->real_escape_string(trim($_GET['target']));
    $hunter = $user["user_name"];
    $log = $mysqli->query("SELECT * FROM ( SELECT * FROM `private` WHERE  `hunter` = '{$hunter}' AND `target` = '{$target}'  OR `hunter` = '{$target}' AND `target` = '{$hunter}' ORDER BY `id` DESC LIMIT 20) AS log ORDER BY `time` ASC");
    $mysqli->query("UPDATE `private` SET `status` = 1 WHERE `hunter` = '{$target}' AND `target` = '{$hunter}'");
    if ($log->num_rows > 0) {
        while ($chat = $log->fetch_assoc()) {
            $message = emoprocess($chat['message']);
            $ptime = date("m/j G:i", $chat['time']);
            $message = emoticon(linking($message, $icon_set));
            if ($chat['hunter'] == $user['user_name']) {
                echo "<li class=\"hunter_private\"><p>{$message}</p><p class=\"ptime\">{$ptime}</p></li>\n";
            } else {
                echo "<li class=\"target_private\"><p>{$message}</p><p class=\"ptime2\">{$ptime}</p></li>\n";
            }
        }
    } else {
        echo "<li>{$emptyprivate}</li>";
    }
} else {
    echo "<li>{$lang_error}</li>";
}
Example #3
0
        }
    }
    return $ans;
}
function webpagelink($dict, $word)
{
    $y = Cologne_hrefyear($dict);
    return '<a href="' . "http://www.sanskrit-lexicon.uni-koeln.de/scans/" . $dict . "Scan/" . $y . "/web/webtc/indexcaller.php" . '?key=' . $word . '&input=slp1&output=SktDevaUnicode" target="_blank">' . $word . "</a>";
}
function linking($fin, $fout, $issuedescription, $issuenumber)
{
    global $header;
    $input = file($fin);
    $input = array_map('trim', $input);
    $outfile = fopen($fout, "w");
    fputs($outfile, $header);
    fputs($outfile, "<h1>{$issuedescription} (See " . '<a href="https://github.com/sanskrit-lexicon/hwnorm1/issues/' . $issuenumber . '">This issue</a>)</h1>');
    $counter = 1;
    foreach ($input as $value) {
        $split = explode(':', $value);
        $dict = $split[0];
        $word = $split[1];
        fputs($outfile, "<tr><td>" . $counter . "</td><td>" . webpagelink($dict, $word) . "</td><td>" . pdflink($dict, $word) . "</td></tr>\n");
        $counter++;
    }
    fputs($outfile, "</table></body></html>");
    fclose($outfile);
    echo "Check {$fout} for testing.\n";
}
linking($argv[1], $argv[2], $argv[3], $argv[4]);