Home | History | Annotate | Download | only in imd

Lines Matching defs:cgi

569 NEOERR *export_image(CGI *cgi, char *prefix, char *path, char *file)
590 err = hdf_set_value (cgi->hdf, prefix, file);
601 err = hdf_set_value (cgi->hdf, buf, num);
605 err = hdf_set_value (cgi->hdf, buf, num);
613 err = hdf_set_value (cgi->hdf, buf, ipath);
619 NEOERR *scale_images (CGI *cgi, char *prefix, int width, int height, int force)
627 obj = hdf_get_obj (cgi->hdf, prefix);
679 static NEOERR *export_album_path(CGI *cgi, char *album, char *prefix)
693 err = hdf_set_value(cgi->hdf, buf, l);
696 err = hdf_set_value(cgi->hdf, buf, album);
706 err = hdf_set_value(cgi->hdf, buf, l);
709 err = hdf_set_value(cgi->hdf, buf, album);
717 NEOERR *dowork_picture (CGI *cgi, char *album, char *picture)
745 base = hdf_get_value (cgi->hdf, "BASEDIR", NULL);
748 cgi_error (cgi, "No BASEDIR in imd file");
752 thumb_width = hdf_get_int_value (cgi->hdf, "ThumbWidth", 120);
753 thumb_height = hdf_get_int_value (cgi->hdf, "ThumbWidth", 90);
754 pic_width = hdf_get_int_value (cgi->hdf, "PictureWidth", 120);
755 pic_height = hdf_get_int_value (cgi->hdf, "PictureWidth", 90);
757 err = hdf_set_value (cgi->hdf, "Context", "picture");
761 rotate = hdf_get_int_value(cgi->hdf, "Query.rotate", 0);
769 err = hdf_set_value (cgi->hdf, "Album", album);
771 err = hdf_set_value (cgi->hdf, "Album.Raw", album);
773 err = export_album_path(cgi, album, "Album.Path");
775 err = hdf_set_value (cgi->hdf, "Picture", picture);
802 err = export_image(cgi, buf, path, name);
811 err = export_image(cgi, buf, path, name);
815 x = hdf_get_int_value (cgi->hdf, buf, -1);
828 hdf_set_value (cgi->hdf, "Picture.width", buf);
830 x = hdf_get_int_value (cgi->hdf, buf, -1);
833 hdf_set_value (cgi->hdf, "Picture.height", buf);
838 hdf_set_value (cgi->hdf, "Picture.width", buf);
840 hdf_set_value (cgi->hdf, "Picture.height", buf);
843 avi = hdf_get_value (cgi->hdf, buf, NULL);
846 err = hdf_set_value(cgi->hdf, "Picture.avi", avi);
849 err = scale_images (cgi, "Show", thumb_width, thumb_height, 0);
867 NEOERR *dowork_album_overview (CGI *cgi, char *album)
880 thumb_width = hdf_get_int_value (cgi->hdf, "ThumbWidth", 120);
881 thumb_height = hdf_get_int_value (cgi->hdf, "ThumbWidth", 90);
896 err = hdf_set_value (cgi->hdf, buf, name);
903 err = hdf_set_int_value(cgi->hdf, buf, uListLength(files));
910 err = export_image(cgi, buf, path, name);
916 err = scale_images (cgi, buf, thumb_width, thumb_height, 0);
923 NEOERR *dowork_album (CGI *cgi, char *album)
935 base = hdf_get_value (cgi->hdf, "BASEDIR", NULL);
938 cgi_error (cgi, "No BASEDIR in imd file");
941 thumb_width = hdf_get_int_value (cgi->hdf, "ThumbWidth", 120);
942 thumb_height = hdf_get_int_value (cgi->hdf, "ThumbWidth", 90);
943 per_page = hdf_get_int_value (cgi->hdf, "PerPage", 50);
944 start = hdf_get_int_value (cgi->hdf, "Query.start", 0);
946 err = hdf_set_value (cgi->hdf, "Album", album);
948 err = hdf_set_value (cgi->hdf, "Album.Raw", album);
950 err = export_album_path(cgi, album, "Album.Path");
954 err = hdf_set_value (cgi->hdf, "Context", "album");
959 err = dowork_album_overview(cgi, path);
966 err = hdf_set_int_value(cgi->hdf, "Album.Count", uListLength(files));
975 err = hdf_set_int_value(cgi->hdf, "Album.Start", start);
977 err = hdf_set_int_value(cgi->hdf, "Album.Next", next);
979 err = hdf_set_int_value(cgi->hdf, "Album.Prev", prev);
981 err = hdf_set_int_value(cgi->hdf, "Album.Last", last);
988 err = export_image(cgi, buf, path, name);
993 err = scale_images (cgi, "Images", thumb_width, thumb_height, 0);
998 NEOERR *dowork_image (CGI *cgi, char *image)
1012 if ((i = hdf_get_int_value(cgi->hdf, "Query.width", 0)) != 0) {
1016 if ((i = hdf_get_int_value(cgi->hdf, "Query.height", 0)) != 0) {
1019 quality = hdf_get_int_value(cgi->hdf, "Query.quality", 0);
1021 if_mod = hdf_get_value(cgi->hdf, "HTTP.IfModifiedSince", NULL);
1023 basepath = hdf_get_value(cgi->hdf, "BASEDIR", NULL);
1026 cgi_error (cgi, "No BASEDIR in imd file");
1075 CGI *cgi;
1088 ne_warn("CGI init");
1089 err = cgi_init(&cgi, NULL);
1093 cgi_destroy(&cgi);
1096 imd_file = hdf_get_value(cgi->hdf, "CGI.PathTranslated", NULL);
1098 err = hdf_read_file (cgi->hdf, imd_file);
1101 cgi_neo_error(cgi, err);
1103 cgi_destroy(&cgi);
1107 cs_file = hdf_get_value(cgi->hdf, "Template", NULL);
1108 image = hdf_get_value(cgi->hdf, "Query.image", NULL);
1109 album = hdf_get_value(cgi->hdf, "Query.album", "");
1110 picture = hdf_get_value(cgi->hdf, "Query.picture", NULL);
1113 err = dowork_image(cgi, image);
1117 cgi_destroy(&cgi);
1125 err = dowork_album (cgi, album);
1129 err = dowork_picture (cgi, album, picture);
1139 cgi_neo_error(cgi, err);
1141 cgi_destroy(&cgi);
1147 err = cgi_display(cgi, cs_file);
1150 cgi_neo_error(cgi, err);
1152 cgi_destroy(&cgi);
1157 cgi_destroy(&cgi);