コード例 #1
0
                    if (!empty($icon)) {
                        $icon = $db->getIconSrc($icon);
                    }
                    if (empty($icon) && isset($entry[Database::KEY_ICON])) {
                        $icon = KPHPUI::iconPath($entry[Database::KEY_ICON]);
                    }
                    $s .= '<tr><td>' . ($icon == null ? '' : '<img src="' . KPHPUI::htmlify($icon) . '" />') . '</td>';
                    $s .= '<td>' . KPHPUI::htmlify($entry[Database::KEY_TITLE]) . '</td>';
                    $url = $entry[Database::KEY_URL];
                    $protoSep = strpos($url, "://");
                    $proto = $protoSep === false ? null : substr($url, 0, $protoSep);
                    $isHttp = $proto == "http" || $proto == "https";
                    $displayed = $isHttp ? substr($url, $protoSep + 3) : $url;
                    $s .= '<td>' . ($isHttp ? '<a href="' : '<span title="') . KPHPUI::htmlify($url) . '">' . KPHPUI::htmlify(strlen($displayed) > 20 ? substr($displayed, 0, 17) . '...' : $displayed) . ($isHttp ? '</a>' : '</span>') . '</td>';
                    $s .= '<td><input type="text" class="col-sm-3 form-control selectOnFocus" value="' . KPHPUI::htmlify($entry[Database::KEY_USERNAME]) . '" /></td>';
                    $s .= '<td id="pwd_' . $uuid . '"><button type="button" class="btn btn-primary passwordLoader" data-uuid="' . $uuid . '" autocomplete="off" data-loading-text="...">' . KPHPUI::l(KPHPUI::LANG_SEE_ENTRY_LOAD) . '</button></td></tr>';
                }
                $s .= '</tbody></table>';
                $answer->set(AjaxAnswer::SUCCESS, $s);
            }
        } else {
            $answer->set(AjaxAnswer::BAD_PASSWORD);
        }
    } else {
        $answer->set(AjaxAnswer::NO_SUCH_ID);
    }
    if (KeePassPHP::$isError) {
        $answer > setDebug(KeePassPHP::$errordump);
    }
}
$answer->send();
コード例 #2
0
ファイル: index.php プロジェクト: marclaporte/KeePassPHP-UI
				<div class="modal-header">
					<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
					<h3><?php 
    echo KPHPUI::l(KPHPUI::LANG_MODAL_SUCCESS_TITLE);
    ?>
</h3>
				</div>
				<div class="modal-body">
					<p class="alert alert-success"><?php 
    echo KPHPUI::l(KPHPUI::LANG_MODAL_SUCCESS_TEXT);
    ?>
</p>
				</div>
				<div class="modal-footer">
					<button type="button" class="btn btn-primary" data-dismiss="modal"><?php 
    echo KPHPUI::l(KPHPUI::LANG_MODAL_CLOSE);
    ?>
</button>
				</div>
			</div>
		</div>
	</div>
<?php 
}
?>
	<script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>
	<script src="js/bootstrap.min.js?3.3.6"></script>
	<script type="text/javascript"><?php 
echo $javascriptContent;
?>
</script>